All Packages Class Hierarchy This Package Previous Next Index
Class jgl.HashComparator
java.lang.Object
|
+----jgl.HashComparator
- public final class HashComparator
- extends Object
- implements BinaryPredicate
HashComparator is a binary predicate that returns true if the hash code of its
first operand is less than the hash code of its second operand. It is used as the
default comparator by many algorithms and containers. It is especially useful for
sorting numbers, as the hash code of the Number subclasses are equal to their primitive
value.
- Version:
- JOS-FileSystem 4 Preview (25-Mar-98)
- Author:
- ObjectSpace, Inc.
-
HashComparator()
-
-
execute(Object, Object)
- Compare the operands based on their hash code.
HashComparator
public HashComparator()
execute
public boolean execute(Object first,
Object second)
- Compare the operands based on their hash code.
- Parameters:
- first - The first object.
- second - The second object.
- Returns:
- true if the hash code of the first operand is less than the hash code of
the second operand using the standard Java hashCode() method.
All Packages Class Hierarchy This Package Previous Next Index