uk.ac.man.cs.rainbow.datamodel
Interface Data.Comparable

All Known Implementing Classes:
Data.Word, StringData
Enclosing class:
Data

public static interface Data.Comparable

Indicate that two data values can be compared for relative order.


Method Summary
 int compare(Data.Comparable otherComparable)
          Check for relative ordering with respect to this object.
 

Method Detail

compare

public int compare(Data.Comparable otherComparable)
            throws TypeException
Check for relative ordering with respect to this object.
Parameters:
otherComparable - Comparable object to compare with.
Returns:
Negative if this object is less, positive if this object is more, and zero if this object is the same. Zero should only be returned if equals would return true.
Throws:
TypeException - If the objects are not of a similar-enough type to compare.