com.g11ntoolkit.sorter
Interface Sorter.Comparable

Enclosing interface:
Sorter

public static interface Sorter.Comparable

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 this object to another object and return a value that indicates their relative order:
 

Method Detail

compareTo

public int compareTo(java.lang.Object other)
Compare this object to another object and return a value that indicates their relative order:

Parameters:
other - an Object specifying the other comparand
Returns:
an int representing the relative order of the two comparands:
  • if (this > other) return >0
  • if (this = other) return 0
  • if (this < other) return <0