Class MutableNode<V>

java.lang.Object
org.egothor.stemmer.trie.MutableNode<V>
Type Parameters:
V - value type

public final class MutableNode<V> extends Object
Mutable build-time node.

The maps exposed by the accessors are the internal mutable backing state of the node. They are returned directly for efficiency and are intended only for closely related trie-building infrastructure.

  • Constructor Details

    • MutableNode

      public MutableNode()
      Creates an empty node.
  • Method Details

    • children

      public Map<Character,MutableNode<V>> children()
      Returns the internal child-node map indexed by transition character.

      The returned map is the internal mutable backing state of this node and is exposed only for efficient cooperation with trie-building infrastructure.

      Returns:
      internal child-node map
    • valueCounts

      public Map<V,Integer> valueCounts()
      Returns the internal local terminal value-count map.

      The returned map is the internal mutable backing state of this node and is exposed only for efficient cooperation with trie-building infrastructure.

      Returns:
      internal local value-count map