public class HashCodeComparator extends Object implements Comparator
Constructor and Description |
---|
HashCodeComparator()
Construct a new
HashCodeComparator . |
Modifier and Type | Method and Description |
---|---|
int |
compare(Object a,
Object b)
Compare the hash codes of two objects.
|
boolean |
equals(Object obj) |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public HashCodeComparator()
HashCodeComparator
.public int compare(Object a, Object b)
hashCode()
is performed on both objects, and then the
resulting integers are compared.compare
in interface Comparator
a
- The first object.b
- The second object.0
if the objects are equal, -1
if a
is less than b
, and 1
if a
is greater than b
.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses