Class CharTrieOfFewIgnoreCase
- java.lang.Object
-
- ch.randelshofer.fastdoubleparser.chr.CharTrieOfFewIgnoreCase
-
- All Implemented Interfaces:
CharTrie
final class CharTrieOfFewIgnoreCase extends java.lang.Object implements 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 Modifier and Type Field Description private CharTrieNoderoot
-
Constructor Summary
Constructors Constructor Description CharTrieOfFewIgnoreCase(java.util.Set<java.lang.String> set)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidadd(java.lang.String str)intmatch(char[] str, int startIndex, int endIndex)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.
-
-
-
Field Detail
-
root
private CharTrieNode root
-
-
Method Detail
-
add
private void add(java.lang.String str)
-
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
public int match(java.lang.CharSequence str, int startIndex, int endIndex)Description copied from interface:CharTrieSearches for the longest matching string in the trie that matches the provided string.
-
-