lava.util
Interface IComparator
- public interface IComparator
Describes object ordering.
Details: An IComparator
compares two objects and tells which of them occurs first in a logical ordering of those objects.
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Compares two objects. |
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Compares two objects.
Details: compare returns less than 0 if o1 occurs before o2 in the logical ordering represented by this comparator, 0 if the are equal, and greater than 0 if o2 occurs before o1.
- Parameters:
o1
- the first objecto2
- the second object- Returns:
- < 0, 0, or > 0 describing the objects' order