Interface Comparable2

All Known Implementing Classes:
FinchSensor

public interface Comparable2

Similar to the Comparable Interface, this interface defines a compareTo2() method that allows the comparison between two multi-variable objects using a specified variable (a key)

Author:
Andrew H. Fagg

Method Summary
 int compareTo2(java.lang.Object obj, VariableType var)
          Compare two objects based on a specific member variable (specified by parameter var)
 

Method Detail

compareTo2

int compareTo2(java.lang.Object obj,
               VariableType var)
Compare two objects based on a specific member variable (specified by parameter var)

Parameters:
obj - The passed object to compare against
var - The key to compare with
Returns:
1 if this.var > obj.var
0 if this.var == obj.var
and -1 if this.var < obj.var