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
ConstructorsConstructorDescriptionEntry(StringList tokens, Attributes attributes) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.tokens()Returns the value of thetokensrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Entry
Creates an instance of aEntryrecord class.- Parameters:
tokens- the value for thetokensrecord componentattributes- the value for theattributesrecord component
-
-
Method Details
-
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 thetokensrecord component.- Returns:
- the value of the
tokensrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-