| java.util.Comparator
Comparator | public interface Comparator (Code) | | Comparator is used to compare two objects to determine their ordering in
respect to each other.
since: 1.2 |
Method Summary | |
public int | compare(T object1, T object2) Compare the two objects to determine the relative ordering. | public boolean | equals(Object object) Compares the argument to the receiver, and answers true if they represent
the same object using a class specific comparison.
Parameters: object - Object the object to compare with this object. |
compare | public int compare(T object1, T object2)(Code) | | Compare the two objects to determine the relative ordering.
Parameters: object1 - an Object to compare Parameters: object2 - an Object to compare an int < 0 if object1 is less than object2, 0 if they are equal,and > 0 if object1 is greater exception: ClassCastException - when objects are not the correct type |
equals | public boolean equals(Object object)(Code) | | Compares the argument to the receiver, and answers true if they represent
the same object using a class specific comparison.
Parameters: object - Object the object to compare with this object. boolean true if the object is the same as thisobject false if it is different from this object. See Also: Object.hashCode |
|
|