Class SortableField
java.lang.Object
ch.tocco.nice2.optional.cms.impl.publicflows.mailform.SortableField
- All Implemented Interfaces:
Comparable<SortableField>
Represents a comparable form field which can contain a sorting number
in the field name. This sorting number can either be prefixed
or postfixed (separated by a underscore ('_')).
Note: this class has a natural ordering that is inconsistent with equals.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(SortableField otherField) static SortableField
createFromCombinedString
(String fieldNameString, String value) Create a new instance.boolean
getName()
getValue()
int
hashCode()
-
Constructor Details
-
SortableField
-
-
Method Details
-
createFromCombinedString
Create a new instance.- Parameters:
fieldNameString
- The field name with or without sorting number (may be prefixed or postfixed).value
- The value of the field.- Returns:
- a new instance.
-
getSortingNr
-
getName
-
getValue
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SortableField>
-
equals
-
hashCode
public int hashCode()
-