edu.washington.cs.pl_if.gui.table
Class GenericRowComparator<Type extends TableRow>

java.lang.Object
  extended by edu.washington.cs.pl_if.gui.table.GenericRowComparator<Type>
All Implemented Interfaces:
RowComparator<Type>, Comparator<Type>

public class GenericRowComparator<Type extends TableRow>
extends Object
implements RowComparator<Type>


Field Summary
 
Fields inherited from interface edu.washington.cs.pl_if.gui.table.RowComparator
ASCENDING, DESCENDING
 
Constructor Summary
GenericRowComparator()
           
 
Method Summary
 int compare(Type r1, Type r2)
           
 void reverseDirection()
          Reverses the direction
 void setColumn(int column)
          Sets the column for sorting
 void setDirection(int direction)
          Sets the direction for sorting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

GenericRowComparator

public GenericRowComparator()
Method Detail

compare

public int compare(Type r1,
                   Type r2)
Specified by:
compare in interface RowComparator<Type extends TableRow>
Specified by:
compare in interface Comparator<Type extends TableRow>

reverseDirection

public void reverseDirection()
Description copied from interface: RowComparator
Reverses the direction

Specified by:
reverseDirection in interface RowComparator<Type extends TableRow>

setColumn

public void setColumn(int column)
Description copied from interface: RowComparator
Sets the column for sorting

Specified by:
setColumn in interface RowComparator<Type extends TableRow>
Parameters:
column - the column

setDirection

public void setDirection(int direction)
Description copied from interface: RowComparator
Sets the direction for sorting

Specified by:
setDirection in interface RowComparator<Type extends TableRow>
Parameters:
direction - the direction