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 int
The field for theposition
record component.private final int[]
The field for thewordIdAndLength
record component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Match
(int position, int[] wordIdAndLength) Creates an instance of aMatch
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
position()
Returns the value of theposition
record component.final String
toString()
Returns a string representation of this record class.int[]
Returns the value of thewordIdAndLength
record component.
-
Field Details
-
position
private final int positionThe field for theposition
record component. -
wordIdAndLength
private final int[] wordIdAndLengthThe field for thewordIdAndLength
record component.
-
-
Constructor Details
-
Match
private Match(int position, int[] wordIdAndLength) Creates an instance of aMatch
record class.- Parameters:
position
- the value for theposition
record componentwordIdAndLength
- the value for thewordIdAndLength
record 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 theposition
record component.- Returns:
- the value of the
position
record component
-
wordIdAndLength
public int[] wordIdAndLength()Returns the value of thewordIdAndLength
record component.- Returns:
- the value of the
wordIdAndLength
record component
-