Toshio Koide | 025a915 | 2014-07-21 11:00:34 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.intent; |
| 2 | |
| 3 | import net.onrc.onos.api.batchoperation.BatchOperationTargetId; |
| 4 | |
| 5 | public class IntentId extends BatchOperationTargetId { |
| 6 | private final String value; |
| 7 | |
| 8 | public IntentId(String id) { |
| 9 | value = id; |
| 10 | } |
| 11 | |
| 12 | @Override |
| 13 | public String toString() { |
| 14 | return value; |
| 15 | } |
| 16 | |
| 17 | @Override |
| 18 | public int hashCode() { |
| 19 | return value.hashCode(); |
| 20 | } |
| 21 | |
| 22 | @Override |
| 23 | public boolean equals(Object obj) { |
| 24 | if (obj instanceof IntentId) { |
| 25 | IntentId other = (IntentId) obj; |
| 26 | return (this.value.equals(other.value)); |
| 27 | } |
| 28 | return false; |
| 29 | } |
| 30 | } |