-
public abstract class TrieStringMatcherTrieStringMatcher is a base class for simple tree-based string matching.
-
-
Method Summary
Modifier and Type Method Description abstract booleanmatches(String input)Returns true if the given Stringis matched by a pattern inthe trieabstract StringshortestMatch(String input)Returns the shortest substring of inputthat ismatched by a pattern in the trie, ornullif no matchexists.abstract StringlongestMatch(String input)Returns the longest substring of inputthat ismatched by a pattern in the trie, ornullif no matchexists.-
-
Method Detail
-
matches
abstract boolean matches(String input)
Returns true if the given
Stringis matched by a pattern inthe trie- Parameters:
input- a java.lang.String object.
-
shortestMatch
abstract String shortestMatch(String input)
Returns the shortest substring of
inputthat ismatched by a pattern in the trie, ornullif no matchexists.- Parameters:
input- a java.lang.String object.
-
longestMatch
abstract String longestMatch(String input)
Returns the longest substring of
inputthat ismatched by a pattern in the trie, ornullif no matchexists.- Parameters:
input- a java.lang.String object.
-
-
-
-