de.erichseifert.gral.data.comparators
Class DataComparator

java.lang.Object
  extended by de.erichseifert.gral.data.comparators.DataComparator
All Implemented Interfaces:
Serializable, Comparator<Number[]>
Direct Known Subclasses:
Ascending, Descending

public abstract class DataComparator
extends Object
implements Comparator<Number[]>, Serializable

Abstract implementation of a Comparator for Number arrays. This class makes it possible to specify the position of the Number arrays that should be compared.

See Also:
Serialized Form

Constructor Summary
DataComparator(int col)
          Constructor.
 
Method Summary
 int getColumn()
          Returns the column to be compared.
 void setColumn(int col)
          Sets the column to be compared to the specified index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Constructor Detail

DataComparator

public DataComparator(int col)
Constructor.

Parameters:
col - index of the column to be compared
Method Detail

getColumn

public int getColumn()
Returns the column to be compared.

Returns:
column index

setColumn

public void setColumn(int col)
Sets the column to be compared to the specified index.

Parameters:
col - column index


Copyright © 2009-2010. All Rights Reserved.