org.apache.beehive.netui.databinding.datagrid.api.sort
Class SortDirection

Object
  extended by SortDirection
All Implemented Interfaces:
Serializable

public class SortDirection
extends Object
implements Serializable

The SortDirection class is an abstract representation of the direction of a sort. This class is able to represent a sort that is either ASCENDING, DESCENDING, or NONE.

The SortDirection class is used to specify the direction of sorting on a Sort JavaBean instance.

See Also:
Serialized Form

Field Summary
static SortDirection ASCENDING
          Direction representing ascending.
static SortDirection DESCENDING
          Direction representing descending.
static int INT_ASCENDING
          Int value representing an ascending sort.
static int INT_DESCENDING
          Int value representing a descending sort.
static int INT_NONE
          Int value representing no sort.
static SortDirection NONE
          Direction representing no sort direction
 
Method Summary
 boolean equals(Object value)
          Equals method.
 int getValue()
          The direction's int value.
 int hashCode()
          Hash code.
 String toString()
          Convert this sort direction to a readable String.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INT_ASCENDING

public static final int INT_ASCENDING
Int value representing an ascending sort.

See Also:
Constant Field Values

INT_DESCENDING

public static final int INT_DESCENDING
Int value representing a descending sort.

See Also:
Constant Field Values

INT_NONE

public static final int INT_NONE
Int value representing no sort.

See Also:
Constant Field Values

ASCENDING

public static final SortDirection ASCENDING
Direction representing ascending.


DESCENDING

public static final SortDirection DESCENDING
Direction representing descending.


NONE

public static final SortDirection NONE
Direction representing no sort direction

Method Detail

toString

public String toString()
Convert this sort direction to a readable String. Note, this does not return the query language operator -- only text for the direction itself.

Overrides:
toString in class Object
Returns:
the readable direction name

equals

public boolean equals(Object value)
Equals method.

Overrides:
equals in class Object
Parameters:
value - value to check
Returns:
true if this direction matches the value; false otherwise.

hashCode

public int hashCode()
Hash code.

Overrides:
hashCode in class Object
Returns:
the hash code

getValue

public int getValue()
The direction's int value.

Returns:
the direction's value