Class CharTrieOfFewIgnoreCase
java.lang.Object
ch.randelshofer.fastdoubleparser.chr.CharTrieOfFewIgnoreCase
- All Implemented Interfaces:
CharTrie
A trie for testing if a String is contained in a set of Strings.
This trie is a directed acyclic graph.
Given: the strings: "NaN", "Inf"
The trie will have the following structure:
root ['N','n', 'I','i']
│ │ │ │
│ │ └─┬─┘
│ │ └─→ node ['N','n']
│ │ │ │
│ │ └─┬─┘
└─┬─┘ └─→ node ['F','f']
└─→ node ['A','a']
│ │
└─┬─┘
└─→ node ['N','N']
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidintmatch(char[] str, int startIndex, int endIndex) Searches for the longest matching string in the trie that matches the provided string.intmatch(CharSequence str, int startIndex, int endIndex) Searches for the longest matching string in the trie that matches the provided string.
-
Field Details
-
root
-
-
Constructor Details
-
CharTrieOfFewIgnoreCase
-
-
Method Details
-
add
-
match
public int match(char[] str, int startIndex, int endIndex) Description copied from interface:CharTrieSearches for the longest matching string in the trie that matches the provided string. -
match
Description copied from interface:CharTrieSearches for the longest matching string in the trie that matches the provided string.
-