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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(SortableField otherField) static SortableFieldcreateFromCombinedString(String fieldNameString, String value) Create a new instance.booleangetName()getValue()inthashCode()
-
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:
compareToin interfaceComparable<SortableField>
-
equals
-
hashCode
public int hashCode()
-