The Trie is a class providing the mechanism to store information in a trie on char strings. It does not by itself store any information, subclasses should be created to hold the information. The Trie is accompanied by its subclass ObjectTrie which can store objects in a trie.
The offset to the first element in next, i.e. the element with numeric value start resides at index 0 in next.
The value of the first element beyond the last element in next.
If start == beyond, this is the suffix String which leads up to the value this node holds (if any). Otherwise, start > beyond and this is a MutableObjectArray pointing to the next nodes, and which is to be indexed with offset start.
deferred boolean isEmpty;
Return YES iff we can hold a value, i.e. if we do not yet hold a value.
protected id createNode String str start int s end int e options int options;
Create the node for that part of the string str starting at s, and ending at e. The TRIE_LOOKUP_PREFIX option is ignored. If this node already exists, it is returned.
When the options include TRIE_FOLD_CASE, the str is inserted in lower case.
protected id findNode String str start int s end int e options int options;
Find the node for that part of the string str starting at s, and ending at e. Iff a prefix match is desired, the node returned is the longest prefix match.
protected void pushSuffix int options;
Push our suffix one node down.
OutputStream write OutputStream s;
deferred OutputStream writeValue OutputStream s;
State supers: Trie
void pushSuffix int options;
Move our value with the suffix.
OutputStream writeValue OutputStream s;