edu.washington.cs.pl_if.gui.table.command
Class CommandRowComparator

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

public class CommandRowComparator
extends Object
implements RowComparator<CommandTableRow>

This class does the comparisons for sorting Host row objects.


Field Summary
 
Fields inherited from interface edu.washington.cs.pl_if.gui.table.RowComparator
ASCENDING, DESCENDING
 
Constructor Summary
CommandRowComparator()
           
 
Method Summary
 int compare(CommandTableRow r1, CommandTableRow 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

CommandRowComparator

public CommandRowComparator()
Method Detail

compare

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

reverseDirection

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

Specified by:
reverseDirection in interface RowComparator<CommandTableRow>

setColumn

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

Specified by:
setColumn in interface RowComparator<CommandTableRow>
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<CommandTableRow>
Parameters:
direction - the direction