edu.washington.cs.pl_if.gui.table.host
Class HostRowComparator

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

public class HostRowComparator
extends Object
implements RowComparator<HostTableRow>

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
HostRowComparator()
           
 
Method Summary
 int compare(HostTableRow r1, HostTableRow 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

HostRowComparator

public HostRowComparator()
Method Detail

compare

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

reverseDirection

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

Specified by:
reverseDirection in interface RowComparator<HostTableRow>

setColumn

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

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