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

Object
  extended by SortStrategy
All Implemented Interfaces:
Serializable

public abstract class SortStrategy
extends Object
implements Serializable

A SortStrategy is an implementation for the state machine which is used to cycle through sort directions.

See Also:
Serialized Form

Constructor Summary
SortStrategy()
           
 
Method Summary
abstract  SortDirection getDefaultDirection()
          Get the default SortDirection.
abstract  SortDirection nextDirection(SortDirection direction)
          Given a direction compute the next SortDirection.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SortStrategy

public SortStrategy()
Method Detail

getDefaultDirection

public abstract SortDirection getDefaultDirection()
Get the default SortDirection.

Returns:
the default SortDirection

nextDirection

public abstract SortDirection nextDirection(SortDirection direction)
Given a direction compute the next SortDirection. Implementations are free to use arbitrary logic to compute the next direction.

Parameters:
direction - the current sort direction
Returns:
the next sort direction