Interface Sorter.Comparer

Enclosing class:
Sorter

public static interface Sorter.Comparer

This interface defines the compare() method used to compare two objects. To sort objects of a given type, you must provide an appropriate Comparer object with a compare() method that orders those objects as desired


Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          Compare objects and return a value that indicates their relative order: if (a > b) return > 0; if (a == b) return 0; if (a < b) return < 0.
 

Method Detail

compare

public int compare(java.lang.Object a,
                   java.lang.Object b)
Compare objects and return a value that indicates their relative order: if (a > b) return > 0; if (a == b) return 0; if (a < b) return < 0.