Package 

Class TrieStringMatcher


  • 
    public abstract class TrieStringMatcher
    
                        

    TrieStringMatcher is a base class for simple tree-based string matching.

    • Method Summary

      Modifier and Type Method Description
      abstract boolean matches(String input) Returns true if the given String is matched by a pattern inthe trie
      abstract String shortestMatch(String input) Returns the shortest substring of input that ismatched by a pattern in the trie, or null if no matchexists.
      abstract String longestMatch(String input) Returns the longest substring of input that ismatched by a pattern in the trie, or null if no matchexists.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • matches

         abstract boolean matches(String input)

        Returns true if the given String is matched by a pattern inthe trie

        Parameters:
        input - a java.lang.String object.
      • shortestMatch

         abstract String shortestMatch(String input)

        Returns the shortest substring of input that ismatched by a pattern in the trie, or null if no matchexists.

        Parameters:
        input - a java.lang.String object.
      • longestMatch

         abstract String longestMatch(String input)

        Returns the longest substring of input that ismatched by a pattern in the trie, or null if no matchexists.

        Parameters:
        input - a java.lang.String object.