Interface ByteTrie
-
- All Known Implementing Classes:
ByteTrieOfFew,ByteTrieOfFewIgnoreCase,ByteTrieOfNone,ByteTrieOfOne,ByteTrieOfOneSingleByte
public interface ByteTrieInterface for a data retrieval tree (trie) of bytes.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ByteTriecopyOf(java.util.Set<java.lang.String> set, boolean ignoreCase)Creates a newByteTriefrom the provided set.static ByteTriecopyOfChars(java.util.Set<java.lang.Character> set, boolean ignoreCase)Creates a newByteTriefrom the provided set.default intmatch(byte[] str)Searches for the longest matching string in the trie that matches the provided string.intmatch(byte[] 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(byte[] str)
Searches for the longest matching string in the trie that matches the provided string.- Parameters:
str- a string in the form of a byte array- Returns:
- the length of the longest matching string, or 0 if no string matches
-
match
int match(byte[] 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
-
copyOf
static ByteTrie copyOf(java.util.Set<java.lang.String> set, boolean ignoreCase)
Creates a newByteTriefrom the provided set.
-
-