Package org.dizitart.no2.common
Class Fields
java.lang.Object
org.dizitart.no2.common.Fields
- All Implemented Interfaces:
Serializable,Comparable<Fields>
- Direct Known Subclasses:
SortableFields
Represents a collection of document field names and provides methods for
manipulating and comparing them.
- Since:
- 4.0
- Author:
- Anindya Chatterjee
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a field name to a list of field names and returns the updated list.intbooleanGets the encoded name for thisFields.Gets an unmodifiable list of field names.inthashCode()booleanstartsWith(Fields other) toString()static FieldsCreates aFieldsinstance with field names.
-
Constructor Details
-
Fields
public Fields()Instantiates a new Fields.
-
-
Method Details
-
withNames
Creates aFieldsinstance with field names.- Parameters:
fields- the fields- Returns:
- the fields
-
addField
Adds a field name to a list of field names and returns the updated list.- Parameters:
field- the field- Returns:
- the fields
-
getFieldNames
Gets an unmodifiable list of field names.- Returns:
- the field names
-
startsWith
- Parameters:
other- the other- Returns:
- the boolean
-
getEncodedName
Gets the encoded name for thisFields.- Returns:
- the encoded name
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Fields>
-
equals
-
hashCode
public int hashCode()
-