org.wingx.table
Class ListSort

java.lang.Object
  extended by org.wingx.table.ListSort
All Implemented Interfaces:
Serializable

public class ListSort
extends Object
implements Serializable

ListSort A simple class to hold the ordering information of one field in a list.

Author:
jde
See Also:
Serialized Form

Constructor Summary
ListSort()
           
ListSort(String field)
          Creates a new ListSort on the given field.
ListSort(String[] fields)
           
ListSort(String field, boolean ascending)
          Creates a new ListSort on the given field.
ListSort(String field, boolean ascending, Comparator comparator)
           
 
Method Summary
 boolean equals(Object o)
           
 Comparator getComparator()
           
 String getField()
          Returns the string representation of the field.
 String[] getFields()
           
 int hashCode()
           
 boolean isAscending()
          Returns true if the current field is marked "ascending".
 void setAscending(boolean ascending)
           
 void setComparator(Comparator comparator)
           
 void switchSort()
          Reverses the order.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListSort

public ListSort()

ListSort

public ListSort(String field)
Creates a new ListSort on the given field.


ListSort

public ListSort(String[] fields)

ListSort

public ListSort(String field,
                boolean ascending)
Creates a new ListSort on the given field.


ListSort

public ListSort(String field,
                boolean ascending,
                Comparator comparator)
Method Detail

switchSort

public void switchSort()
Reverses the order.


isAscending

public boolean isAscending()
Returns true if the current field is marked "ascending".


getField

public String getField()
Returns the string representation of the field.


getFields

public String[] getFields()

setAscending

public void setAscending(boolean ascending)

getComparator

public Comparator getComparator()

setComparator

public void setComparator(Comparator comparator)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


wingS Swings ;-)