net.sourceforge.jiu.util
Interface ComparatorInterface
- All Known Implementing Classes:
- OctreeNode, RGBColorComparator
public interface ComparatorInterface
To be able to do sorting in Java 1.1 as defined in java.util.Arrays (which
is only available in Java 1.2 and higher), we offer a java.util.Comparator
clone under a different name: ComparatorInterface.
Sorting will be provided by the Sort
class of this package.
Method Summary |
int |
compare(Object o1,
Object o2)
Compares the two argument objects and returns their relation. |
compare
int compare(Object o1,
Object o2)
- Compares the two argument objects and returns their relation.
Returns
- a value < 0 if
o1
is smaller than o2
,
- 0 if
o1
is equal to o2
and
- a value > 0 if
o1
is greater than o2
.
Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Marco Schmidt