T
- The type of identifier.public final class VTNIdentifiableComparator<T extends Comparable<T>> extends Object implements Comparator<VTNIdentifiable<T>>, Serializable
VTNIdentifiableComparator
provides a comparison function for
VTNIdentifiable
instances.
This class is used to sort VTNIdentifiable
instances by natural
ordering.
Constructor and Description |
---|
VTNIdentifiableComparator(Class<T> type)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(VTNIdentifiable<T> o1,
VTNIdentifiable<T> o2)
Compare the given two
VTNIdentifiable instances. |
boolean |
equals(Object o)
Determine whether the given object is identical to this object.
|
Class<T> |
getIdentifierType()
Return the type of the identifier.
|
int |
hashCode()
Return the hash code of this object.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public Class<T> getIdentifierType()
public int compare(VTNIdentifiable<T> o1, VTNIdentifiable<T> o2)
VTNIdentifiable
instances.compare
in interface Comparator<VTNIdentifiable<T extends Comparable<T>>>
o1
- The first object to be compared.o2
- The second object to be compared.public boolean equals(Object o)
equals
in interface Comparator<VTNIdentifiable<T extends Comparable<T>>>
equals
in class Object
o
- An object to be compared.true
if identical. Otherwise false
.Copyright © 2018 OpenDaylight. All rights reserved.