weiss.util
Interface Comparator

All Superinterfaces:
java.io.Serializable

public interface Comparator
extends java.io.Serializable

Comparator function object interface.


Method Summary
 int compare(java.lang.Object lhs, java.lang.Object rhs)
          Return the result of comparing lhs and rhs.
 

Method Detail

compare

public int compare(java.lang.Object lhs,
                   java.lang.Object rhs)
            throws java.lang.ClassCastException
Return the result of comparing lhs and rhs.
Parameters:
lhs - first object.
rhs - second object.
Returns:
< 0 if lhs is less than rhs, 0 if lhs is equal to rhs, > 0 if lhs is greater than rhs.
Throws:
java.lang.ClassCastException - if objects cannot be compared.