java.lang.Object
omix.util.collections.IdentityComparator
- All Implemented Interfaces:
Comparator<Object>
public class IdentityComparator extends Object implements Comparator<Object>
Compares two objects after identity hashcode.
- Author:
- Dr. Peter Droste, Omix Visualization
- See Also:
System.identityHashCode(Object)
-
Field Summary
Fields Modifier and Type Field Description static IdentityComparator
INSTANCE
The only available instance of this class. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
INSTANCE
The only available instance of this class.
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Object>
- Parameters:
i
- first objectj
- second object- Returns:
- 0 if objects are identical, -1 and 1 for less or greater identity hashcodes.
- See Also:
Comparator.compare(java.lang.Object, java.lang.Object)
-