Package com.thingworx.types.data.sorters
Class SortCollection
java.lang.Object
com.thingworx.types.data.sorters.SortCollection
- All Implemented Interfaces:
ISort
,Comparator<ValueCollection>
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class SortCollection
extends Object
implements ISort
Sorter based on the composition of a collection of child sorters.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
int
compare
(ValueCollection row1, ValueCollection row2) boolean
boolean
void
resolveFields
(DataShapeDefinition fields) void
setAscending
(boolean value) void
setFieldName
(String value) org.json.JSONArray
toJSON()
Produces JSONArray of child sorters' JSON representations.org.json.JSONArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
SortCollection
-
-
Method Details
-
addSort
-
clearSorts
-
getSorters
-
resolveFields
- Specified by:
resolveFields
in interfaceISort
-
compare
@ThingworxExtensionApiMethod(since={6,6}) public int compare(ValueCollection row1, ValueCollection row2) - Specified by:
compare
in interfaceComparator<ValueCollection>
-
getFieldName
- Specified by:
getFieldName
in interfaceISort
-
isAscending
- Specified by:
isAscending
in interfaceISort
-
setAscending
- Specified by:
setAscending
in interfaceISort
-
setFieldName
- Specified by:
setFieldName
in interfaceISort
-
isCaseSensitive
- Specified by:
isCaseSensitive
in interfaceISort
-
toJSON
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONArray toJSON() throws org.json.JSONException
Produces JSONArray of child sorters' JSON representations. -
toJSONArray
@ThingworxExtensionApiMethod(since={6,6}) public org.json.JSONArray toJSONArray() throws org.json.JSONException- Specified by:
toJSONArray
in interfaceISort
- Returns:
- JSONArray representation of this sorter
- Throws:
org.json.JSONException
- Upon internal errors
-