Class ListSorter
- java.lang.Object
-
- com.day.cq.analytics.testandtarget.ListSorter
-
public class ListSorter extends java.lang.Object
A data-object that holds data related to list sorting - property and direction
-
-
Constructor Summary
Constructors Constructor Description ListSorter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListSorter
ascending()
Signals that the sorting should be done in acending modeListSorter
descending()
Signals that sorting should be done in descending modejava.lang.String
getProperty()
Returns the name of the property used for sortingboolean
isAscending()
Returns the type of sorting that is usedListSorter
property(java.lang.String p)
Sets the property for this sorter
-
-
-
Method Detail
-
property
public ListSorter property(java.lang.String p)
Sets the property for this sorter- Parameters:
p
- aString
object representing the name of the property- Returns:
- an instance of this object
-
ascending
public ListSorter ascending()
Signals that the sorting should be done in acending mode- Returns:
- an instance of this object
-
descending
public ListSorter descending()
Signals that sorting should be done in descending mode- Returns:
- an instance of this object
-
isAscending
public boolean isAscending()
Returns the type of sorting that is used- Returns:
true
if this sorter uses ascending sorting,false
otherwise
-
getProperty
public java.lang.String getProperty()
Returns the name of the property used for sorting- Returns:
- a
String
representing the name of the property used for sorting.
-
-