net.sourceforge.jiu.util

Interface ComparatorInterface

Known Implementing Classes:
ContouringColorPair, 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.

Method Details

compare

public 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.