StocksMonitor 1.5.0

hirondelle.stocks.table
Class SortBy

Object
  extended by SortBy

public final class SortBy
extends Object

Data-centric, immutable value class representing both the direction of a sort and the index of its column.

SortBy does not have any knowledge of table contents, so it may be used with any sorted table.


Field Summary
static int NO_SELECTED_COLUMN
          The special value of the column index used by NONE.
static SortBy NONE
          A special SortBy which represents the absence of any sort.
 
Constructor Summary
SortBy(SortOrder aSortOrder, int aColumn)
          Constructor.
 
Method Summary
 boolean equals(Object aThat)
           
 int getColumn()
          Return the column index identifying the sort, or NO_SELECTED_COLUMN in the case of NONE.
 SortOrder getOrder()
          Return the sense of the sort, either ascending or descending.
 int hashCode()
           
 String toString()
          Represent this object as a String - intended for logging purposes only.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final SortBy NONE
A special SortBy which represents the absence of any sort.


NO_SELECTED_COLUMN

public static final int NO_SELECTED_COLUMN
The special value of the column index used by NONE.

See Also:
Constant Field Values
Constructor Detail

SortBy

public SortBy(SortOrder aSortOrder,
              int aColumn)
Constructor.

Parameters:
aSortOrder - satisfies aSortOrder!=null and denotes ascending or descending order.
aColumn - satisfies aColumn >= 0 and is the index of a table column.
Method Detail

getOrder

public SortOrder getOrder()
Return the sense of the sort, either ascending or descending.


getColumn

public int getColumn()
Return the column index identifying the sort, or NO_SELECTED_COLUMN in the case of NONE.


toString

public String toString()
Represent this object as a String - intended for logging purposes only.

Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

StocksMonitor 1.5.0

Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53