protected static class StringDecoderCache.TrieCache.TrieNode extends Object
myChildren
is a two dimension array for the children of this
node. We use a 2 dimension array to reduce the memory footprint of
the trie by taking advantage of the clustering within the encoding of
languages. The first dimension of the array we refer to as the
zone
and represents the first/high nibble of the value for
the child node. The second dimension of the array is the second/low
nibble.
Constructor and Description |
---|
StringDecoderCache.TrieCache.TrieNode(byte value)
Creates a new Node.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(StringDecoderCache.TrieCache.TrieNode child)
Adds a child node to this node.
|
StringDecoderCache.TrieCache.TrieNode |
child(byte value)
Returns the child node with the specified value.
|
String |
getDecoded()
Returns the node's decoded value.
|
byte |
getValue()
Returns the node's value.
|
void |
setDecoded(String decoded)
Sets the decoded value for the node.
|
public StringDecoderCache.TrieCache.TrieNode(byte value)
value
- The value for the node.public void addChild(StringDecoderCache.TrieCache.TrieNode child)
child
- The child node to add.public StringDecoderCache.TrieCache.TrieNode child(byte value)
value
- The value for the child to find.public String getDecoded()
public byte getValue()
public void setDecoded(String decoded)
decoded
- The decoded value for the node.Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.