Package org.dizitart.no2.common
Class SortableFields
java.lang.Object
org.dizitart.no2.common.Fields
org.dizitart.no2.common.SortableFields
- All Implemented Interfaces:
Serializable,Comparable<Fields>
Represents a collection of fields that can be sorted, with each field
having a specified sort order.
- Since:
- 4.0
- Author:
- Anindya Chatterjee
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a field and its corresponding sort order to a list of sortable fields.Gets the sort by field specifications.static SortableFieldsCreates aSortableFieldsinstance with field names.Methods inherited from class org.dizitart.no2.common.Fields
addField, compareTo, equals, getEncodedName, getFieldNames, hashCode, startsWith, toString
-
Constructor Details
-
SortableFields
public SortableFields()Instantiates a newSortableFields.
-
-
Method Details
-
withNames
Creates aSortableFieldsinstance with field names.- Parameters:
fields- the fields- Returns:
- the fields
-
addField
Adds a field and its corresponding sort order to a list of sortable fields.- Parameters:
field- the fieldsortOrder- the sort order- Returns:
- the sortable fields
-
getSortingOrders
Gets the sort by field specifications.- Returns:
- the sort specs
-