Class TrieStringMatcher

  • All Implemented Interfaces:

    
    public abstract class TrieStringMatcher
    
                        

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

    Author:

    vincent

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait