Package opennlp.tools.stemmer.hunspell
Record Class HunspellDictionary.UnsupportedDirective
java.lang.Object
java.lang.Record
opennlp.tools.stemmer.hunspell.HunspellDictionary.UnsupportedDirective
- Record Components:
directive- The directive name.source- The affix file path, oraffix streamfor stream loading.lineNumber- The one-based source line number.
- Enclosing class:
HunspellDictionary
public static record HunspellDictionary.UnsupportedDirective(String directive, String source, int lineNumber)
extends Record
The first occurrence of an unsupported affix directive.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thedirectiverecord component.private final intThe field for thelineNumberrecord component.private final StringThe field for thesourcerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUnsupportedDirective(String directive, String source, int lineNumber) Creates a diagnostic with a directive name and source location. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirectiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thelineNumberrecord component.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
directive
The field for thedirectiverecord component. -
source
The field for thesourcerecord component. -
lineNumber
private final int lineNumberThe field for thelineNumberrecord component.
-
-
Constructor Details
-
UnsupportedDirective
Creates a diagnostic with a directive name and source location.- Parameters:
directive- The nonblank directive name.source- The nonblank source description.lineNumber- The positive source line number.- Throws:
IllegalArgumentException- Thrown if a name is null or blank, or the line number is not positive.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
directive
Returns the value of thedirectiverecord component.- Returns:
- the value of the
directiverecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
lineNumber
public int lineNumber()Returns the value of thelineNumberrecord component.- Returns:
- the value of the
lineNumberrecord component
-