aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java
diff options
context:
space:
mode:
authorAshlee Young <ashlee@wildernessvoice.com>2015-11-05 14:00:42 -0800
committerAshlee Young <ashlee@wildernessvoice.com>2015-11-05 14:00:42 -0800
commitb34f82bf11934fc6b938ef997d536a7ccea76c36 (patch)
tree10559ebf65962abb741883ca9d23aec241ced504 /framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java
parent2cdecb8c41956d7dd8ab5d59591ebc21f3c64a9e (diff)
Updates ONOS tree to checkin id ca9cc8e28eba18da77f4fa021fb7c3a3f76e5d44
upstream. Change-Id: I49f8e41733afea8101ec50c0102213c8d18949ae Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java')
-rw-r--r--framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java
index 05c31aac..1f45e80e 100644
--- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java
+++ b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairId.java
@@ -19,8 +19,7 @@ import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.UUID;
-
-import com.google.common.base.Objects;
+import java.util.Objects;
/**
* Representation of a Port Pair ID.
@@ -40,22 +39,22 @@ public final class PortPairId {
}
/**
- * Constructor to create port pair id from UUID.
+ * Returns newly created port pair id object.
*
* @param id UUID of port pair id
* @return object of port pair id
*/
- public static PortPairId portPairId(UUID id) {
+ public static PortPairId of(UUID id) {
return new PortPairId(id);
}
/**
- * Constructor to create port pair id from string.
+ * Returns newly created port pair id object.
*
* @param id port pair id in string
* @return object of port pair id
*/
- public static PortPairId portPairId(String id) {
+ public static PortPairId of(String id) {
return new PortPairId(UUID.fromString(id));
}
@@ -73,10 +72,9 @@ public final class PortPairId {
if (this == obj) {
return true;
}
-
- if (obj.getClass() == this.getClass()) {
- PortPairId that = (PortPairId) obj;
- return Objects.equal(this.portPairId, that.portPairId);
+ if (obj instanceof PortPairId) {
+ final PortPairId other = (PortPairId) obj;
+ return Objects.equals(this.portPairId, other.portPairId);
}
return false;
}
@@ -89,7 +87,7 @@ public final class PortPairId {
@Override
public String toString() {
return toStringHelper(this)
- .add("portPairId", portPairId.toString())
+ .add("portPairId", portPairId)
.toString();
}
}