|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.web.data.Sort
public abstract class Sort
Sort Base sorting helper supports locale specific case sensitive, case in-sensitive and numeric data sorting.
Field Summary | |
---|---|
protected boolean |
bForward
sort direction |
protected java.text.Collator |
collator
locale sensitive collator |
protected java.lang.String |
column
column name to sort against |
protected java.util.List |
data
list of Object[] data to sort |
protected java.util.List |
keys
collation keys for comparisons |
protected java.lang.String |
sortMode
sort mode (see IDataContainer constants) |
Constructor Summary | |
---|---|
Sort(java.util.List data,
java.lang.String column,
boolean bForward,
java.lang.String mode)
Constructor |
Method Summary | |
---|---|
protected java.util.List |
buildCollationKeys(java.text.Collator collator)
Build a list of collation keys for comparing locale sensitive strings or build the appropriate objects for comparison for other standard data types. |
protected java.util.Comparator |
getComparator()
Return the comparator to be used during column value comparison |
protected static java.lang.String |
getGetterMethodName(java.lang.String name)
Return the name of the Bean getter method for the specified getter name |
abstract void |
sort()
Runs the Sort routine on the current dataset |
protected void |
swap(java.util.List v,
int a,
int b)
Given the array and two indices, swap the two items in the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List data
protected java.lang.String column
protected boolean bForward
protected java.lang.String sortMode
protected java.text.Collator collator
protected java.util.List keys
Constructor Detail |
---|
public Sort(java.util.List data, java.lang.String column, boolean bForward, java.lang.String mode)
data
- a the List of String[] data to sortcolumn
- the column getter method to use on the row to sortbForward
- true for a forward sort, false for a reverse sortmode
- sort mode to use (see IDataContainer constants)Method Detail |
---|
public abstract void sort()
protected java.util.List buildCollationKeys(java.text.Collator collator)
collator
- the Collator object to use to build String keysprotected void swap(java.util.List v, int a, int b)
protected java.util.Comparator getComparator()
protected static java.lang.String getGetterMethodName(java.lang.String name)
name
- of the field to build getter method name for e.g. "value"
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |