Class TrieMatch<V>

  • Type Parameters:
    V - the type parameter
    All Implemented Interfaces:
    Serializable

    public class TrieMatch<V>
    extends Object
    implements Serializable

    Represents a match in a Trie.

    Author:
    David B. Bracewell
    See Also:
    Serialized Form
    • Field Detail

      • start

        public final int start
        The starting index.
      • end

        public final int end
        The ending index.
      • value

        public final V value
        The value of the matched key
    • Constructor Detail

      • TrieMatch

        public TrieMatch​(int start,
                         int end,
                         V value)
        Instantiates a new Trie match.
        Parameters:
        start - the start
        end - the end
        value - the value
    • Method Detail

      • getMatch

        public String getMatch​(String content)
        Extracts the matched portion of a content.
        Parameters:
        content - the content
        Returns:
        the match
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object