kiwi.util
Class HashCodeComparator

java.lang.Object
  |
  +--kiwi.util.HashCodeComparator
All Implemented Interfaces:
Comparator

public class HashCodeComparator
extends java.lang.Object
implements Comparator

A hash code comparator. This class compares the hash codes of two objects.

Author:
Mark Lindner, PING Software Group

Constructor Summary
HashCodeComparator()
          Construct a new HashCodeComparator.
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          Compare the hash codes of two objects.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

HashCodeComparator

public HashCodeComparator()
Construct a new HashCodeComparator.
Method Detail

compare

public int compare(java.lang.Object a,
                   java.lang.Object b)
Compare the hash codes of two objects. A hashCode() is performed on both objects, and then the resulting integers are compared.
Specified by:
compare in interface Comparator
Parameters:
a - The first object.
b - The second object.
Returns:
0 if the objects are equal, -1 if a is less than b, and 1 if a is greater than b.