| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
Sort(java.util.List data,
java.lang.String column,
boolean bForward,
java.lang.String mode)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
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)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"Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.