Record Class UserDictionary.Match
java.lang.Object
java.lang.Record
org.apache.lucene.analysis.ja.dict.UserDictionary.Match
- Enclosing class:
UserDictionary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thepositionrecord component.private final int[]The field for thewordIdAndLengthrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMatch(int position, int[] wordIdAndLength) Creates an instance of aMatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.int[]Returns the value of thewordIdAndLengthrecord component.
-
Field Details
-
position
private final int positionThe field for thepositionrecord component. -
wordIdAndLength
private final int[] wordIdAndLengthThe field for thewordIdAndLengthrecord component.
-
-
Constructor Details
-
Match
private Match(int position, int[] wordIdAndLength) Creates an instance of aMatchrecord class.- Parameters:
position- the value for thepositionrecord componentwordIdAndLength- the value for thewordIdAndLengthrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
position
public int position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
wordIdAndLength
public int[] wordIdAndLength()Returns the value of thewordIdAndLengthrecord component.- Returns:
- the value of the
wordIdAndLengthrecord component
-