Package org.egothor.stemmer.trie
Record Class NodeData<V>
java.lang.Object
java.lang.Record
org.egothor.stemmer.trie.NodeData<V>
- Type Parameters:
V- value type- Record Components:
edgeLabels- edge labelschildNodeIds- child node identifiersorderedValues- ordered valuesorderedCounts- ordered counts
public record NodeData<V>(char[] edgeLabels, int[] childNodeIds, V[] orderedValues, int[] orderedCounts)
extends Record
Intermediate node data used during deserialization before child references
are resolved.
The arrays exposed by the accessors are the internal backing storage of this holder. They are returned directly for efficiency and therefore must be treated as read-only by callers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint[]Returns the value of thechildNodeIdsrecord component.char[]Returns the value of theedgeLabelsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.int[]Returns the value of theorderedCountsrecord component.V[]Returns the value of theorderedValuesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NodeData
Creates an instance of aNodeDatarecord class.- Parameters:
edgeLabels- the value for theedgeLabelsrecord componentchildNodeIds- the value for thechildNodeIdsrecord componentorderedValues- the value for theorderedValuesrecord componentorderedCounts- the value for theorderedCountsrecord 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). -
edgeLabels
public char[] edgeLabels()Returns the value of theedgeLabelsrecord component.- Returns:
- the value of the
edgeLabelsrecord component
-
childNodeIds
public int[] childNodeIds()Returns the value of thechildNodeIdsrecord component.- Returns:
- the value of the
childNodeIdsrecord component
-
orderedValues
Returns the value of theorderedValuesrecord component.- Returns:
- the value of the
orderedValuesrecord component
-
orderedCounts
public int[] orderedCounts()Returns the value of theorderedCountsrecord component.- Returns:
- the value of the
orderedCountsrecord component
-