applicationLogic.utility
Class Sort
java.lang.Object
applicationLogic.utility.Sort
public class Sort
- extends java.lang.Object
The sort is performed on the data stored in the KeyValuePair
object, where the data is sorted according to a user specified
column, and the sort depends on the data type identified in KeyValuePair.
The sort can be in ascending or descending order.
- Author:
- 02leungi
Constructor Summary |
Sort()
|
Method Summary |
java.util.List |
ascend(KeyValuePair kvp,
int column)
Sort the data in 'kvp' in ascending order according
to column 'column'. |
java.util.List |
descend(KeyValuePair kvp,
int column)
Sort the data in 'kvp' in descending order according
to column 'column'. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sort
public Sort()
ascend
public java.util.List ascend(KeyValuePair kvp,
int column)
- Sort the data in 'kvp' in ascending order according
to column 'column'.
- Parameters:
kvp
- Keys and values, where values will be sorted.column
- Column number within 'kvp's values to be sorted.
- Returns:
- A list containing the rows of the data from 'kvp' sorted
according to column 'column'.
descend
public java.util.List descend(KeyValuePair kvp,
int column)
- Sort the data in 'kvp' in descending order according
to column 'column'.
- Parameters:
kvp
- Keys and values, where values will be sorted.column
- Column number within 'kvp's values to be sorted.
- Returns:
- A list containing the rows of the data from 'kvp' sorted
according to column 'column'.