Interface Sorter.Comparable

Enclosing class:
Sorter

public static interface Sorter.Comparable

This is an alternative interface that can be used to order objects. If a class implements this Comparable interface, then any two instances of that class can be directly compared by invoking the compareTo() method.


Method Summary
 int compareTo(java.lang.Object other)
          Compare objects and return a value that indicates their relative order: if (this > other) return > 0 if (this == other) return 0 if (this < other) return < 0
 

Method Detail

compareTo

public int compareTo(java.lang.Object other)
Compare objects and return a value that indicates their relative order: if (this > other) return > 0 if (this == other) return 0 if (this < other) return < 0