diff options
author | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-05 14:00:42 -0800 |
---|---|---|
committer | Ashlee Young <ashlee@wildernessvoice.com> | 2015-11-05 14:00:42 -0800 |
commit | b34f82bf11934fc6b938ef997d536a7ccea76c36 (patch) | |
tree | 10559ebf65962abb741883ca9d23aec241ced504 /framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairGroupId.java | |
parent | 2cdecb8c41956d7dd8ab5d59591ebc21f3c64a9e (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/PortPairGroupId.java')
-rw-r--r-- | framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairGroupId.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairGroupId.java b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairGroupId.java index 0474901c..a52a2bb3 100644 --- a/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairGroupId.java +++ b/framework/src/onos/apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/PortPairGroupId.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 Group ID. @@ -40,22 +39,22 @@ public final class PortPairGroupId { } /** - * Constructor to create port pair group id from UUID. + * Returns newly created port pair group id object. * - * @param id UUID of port pair group id + * @param id port pair group id in UUID * @return object of port pair group id */ - public static PortPairGroupId portPairGroupId(UUID id) { + public static PortPairGroupId of(UUID id) { return new PortPairGroupId(id); } /** - * Constructor to create port pair group id from string. + * Returns newly created port pair group id object. * * @param id port pair group id in string * @return object of port pair group id */ - public static PortPairGroupId portPairGroupId(String id) { + public static PortPairGroupId of(String id) { return new PortPairGroupId(UUID.fromString(id)); } @@ -73,10 +72,9 @@ public final class PortPairGroupId { if (this == obj) { return true; } - - if (obj.getClass() == this.getClass()) { - PortPairGroupId that = (PortPairGroupId) obj; - return Objects.equal(this.portPairGroupId, that.portPairGroupId); + if (obj instanceof PortPairGroupId) { + final PortPairGroupId other = (PortPairGroupId) obj; + return Objects.equals(this.portPairGroupId, other.portPairGroupId); } return false; } @@ -88,8 +86,7 @@ public final class PortPairGroupId { @Override public String toString() { - return toStringHelper(this) - .add("portPairGroupId", portPairGroupId.toString()) + return toStringHelper(this).add("portPairGroupId", portPairGroupId) .toString(); } } |