Interface CharTrie
-
- All Known Implementing Classes:
CharTrieOfFew,CharTrieOfFewIgnoreCase,CharTrieOfNone,CharTrieOfOne,CharTrieOfOneSingleChar
public interface CharTrieInterface for a data retrieval tree (trie) of characters.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static CharTriecopyOf(java.util.Set<java.lang.String> set, boolean ignoreCase)Creates a newCharTriefrom the provided set.default intmatch(char[] str)Searches for the longest matching string in the trie that matches the provided string.intmatch(char[] str, int startIndex, int endIndex)Searches for the longest matching string in the trie that matches the provided string.default intmatch(java.lang.CharSequence str)Searches for the longest matching string in the trie that matches the provided string.intmatch(java.lang.CharSequence str, int startIndex, int endIndex)Searches for the longest matching string in the trie that matches the provided string.
-
-
-
Method Detail
-
match
default int match(java.lang.CharSequence str)
Searches for the longest matching string in the trie that matches the provided string.- Parameters:
str- a string in the form of aCharSequence- Returns:
- the length of the longest matching string, or 0 if no string matches
-
match
default int match(char[] str)
Searches for the longest matching string in the trie that matches the provided string.- Parameters:
str- a string in the form of a char array- Returns:
- the length of the longest matching string, or 0 if no string matches
-
match
int match(java.lang.CharSequence str, int startIndex, int endIndex)Searches for the longest matching string in the trie that matches the provided string.- Parameters:
str- a stringstartIndex- start index (inclusive)endIndex- end index (exclusive)- Returns:
- the length of the longest matching string, or 0 if no string matches
-
match
int match(char[] str, int startIndex, int endIndex)Searches for the longest matching string in the trie that matches the provided string.- Parameters:
str- a stringstartIndex- start index (inclusive)endIndex- end index (exclusive)- Returns:
- the length of the longest matching string, or 0 if no string matches
-
-