Package opennlp.tools.stemmer.hunspell
Record Class HunspellDictionary.WordBreak
java.lang.Object
java.lang.Record
opennlp.tools.stemmer.hunspell.HunspellDictionary.WordBreak
- Record Components:
separator- The separator text without anchors. Never empty.atStart- Whether the separator must begin the word.atEnd- Whether the separator must end the word.
- Enclosing class:
HunspellDictionary
static record HunspellDictionary.WordBreak(String separator, boolean atStart, boolean atEnd)
extends Record
One
BREAK declaration: a separator and the anchors that bind it to the start
or end of the word.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanatEnd()Returns the value of theatEndrecord component.booleanatStart()Returns the value of theatStartrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.(package private) static HunspellDictionary.WordBreakParses a declaration such as-,^-, or-$.Returns the value of theseparatorrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
Constructor Details
-
Method Details
-
parse
Parses a declaration such as-,^-, or-$.- Parameters:
declaration- The declared separator with optional anchors.line- The one-based source line, for diagnostics.- Returns:
- The parsed declaration.
- Throws:
IOException- Thrown if the declaration consists of anchors only.
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
separator
Returns the value of theseparatorrecord component.- Returns:
- the value of the
separatorrecord component
-
atStart
public boolean atStart()Returns the value of theatStartrecord component.- Returns:
- the value of the
atStartrecord component
-
atEnd
public boolean atEnd()Returns the value of theatEndrecord component.- Returns:
- the value of the
atEndrecord component
-