Record Class Entry
java.lang.Object
java.lang.Record
opennlp.tools.dictionary.serializer.Entry
An
Entry
is a StringList
which can
optionally be mapped to attributes.
entries
are read and written by the DictionaryEntryPersistor
.
- See Also:
-
Constructor Summary
ConstructorDescriptionEntry
(StringList tokens, Attributes attributes) Creates an instance of aEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributes
record component.final boolean
Indicates whether some other object is "equal to" this one.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.final int
hashCode()
Returns a hash code value for this object.tokens()
Returns the value of thetokens
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Entry
Creates an instance of aEntry
record class.- Parameters:
tokens
- the value for thetokens
record componentattributes
- the value for theattributes
record component
-
-
Method Details
-
getTokens
Deprecated, for removal: This API element is subject to removal in a future version. -
getAttributes
Deprecated, for removal: This API element is subject to removal in a future version. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
tokens
Returns the value of thetokens
record component.- Returns:
- the value of the
tokens
record component
-
attributes
Returns the value of theattributes
record component.- Returns:
- the value of the
attributes
record component
-