aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LinkLocalRemoteIdentifiersTlv.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LinkLocalRemoteIdentifiersTlv.java')
-rw-r--r--framework/src/onos/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LinkLocalRemoteIdentifiersTlv.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/framework/src/onos/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LinkLocalRemoteIdentifiersTlv.java b/framework/src/onos/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LinkLocalRemoteIdentifiersTlv.java
index 988925f5..0c412432 100644
--- a/framework/src/onos/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LinkLocalRemoteIdentifiersTlv.java
+++ b/framework/src/onos/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/LinkLocalRemoteIdentifiersTlv.java
@@ -18,16 +18,13 @@ package org.onosproject.bgpio.types;
import java.util.Objects;
import org.jboss.netty.buffer.ChannelBuffer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.google.common.base.MoreObjects;
/**
* Provides Implementation of Link Local/Remote IdentifiersTlv.
*/
-public class LinkLocalRemoteIdentifiersTlv implements BGPValueType {
- private static final Logger log = LoggerFactory.getLogger(LinkLocalRemoteIdentifiersTlv.class);
+public class LinkLocalRemoteIdentifiersTlv implements BgpValueType {
public static final short TYPE = 258;
private static final int LENGTH = 8;
@@ -120,6 +117,20 @@ public class LinkLocalRemoteIdentifiersTlv implements BGPValueType {
}
@Override
+ public int compareTo(Object o) {
+ if (this.equals(o)) {
+ return 0;
+ }
+ int result = ((Integer) (this.linkLocalIdentifer))
+ .compareTo((Integer) (((LinkLocalRemoteIdentifiersTlv) o).linkLocalIdentifer));
+ if (result != 0) {
+ return result;
+ }
+ return ((Integer) (this.linkRemoteIdentifer))
+ .compareTo((Integer) (((LinkLocalRemoteIdentifiersTlv) o).linkRemoteIdentifer));
+ }
+
+ @Override
public String toString() {
return MoreObjects.toStringHelper(getClass())
.add("TYPE", TYPE)