V
- value typepublic static class PatriciaTrie.PatriciaNode<V>
extends java.lang.Object
PatriciaTrie
containing a String key and associated value dataConstructor and Description |
---|
PatriciaNode(java.lang.String key,
V value,
int bit)
Constructs a new node
|
Modifier and Type | Method and Description |
---|---|
int |
getBit()
Returns this node's critical bit index
|
java.lang.String |
getKey()
Get this node's key
|
PatriciaTrie.PatriciaNode<V> |
getLeft()
Returns this node's left node
|
PatriciaTrie.PatriciaNode<V> |
getRight()
Returns this node's right node
|
V |
getValue()
Returns this node's value
|
void |
setLeft(PatriciaTrie.PatriciaNode<V> left)
Set this node's left node
|
void |
setRight(PatriciaTrie.PatriciaNode<V> right)
Set this node's right node
|
void |
setValue(V value)
Sets this node's value
|
java.lang.String |
toString() |
public PatriciaNode(java.lang.String key, V value, int bit)
key
- this node's keyvalue
- this node's valuebit
- this node's critical bitpublic java.lang.String getKey()
public V getValue()
public void setValue(V value)
value
- value to setpublic int getBit()
public PatriciaTrie.PatriciaNode<V> getLeft()
public PatriciaTrie.PatriciaNode<V> getRight()
public void setLeft(PatriciaTrie.PatriciaNode<V> left)
left
- left nodepublic void setRight(PatriciaTrie.PatriciaNode<V> right)
right
- right nodepublic java.lang.String toString()
toString
in class java.lang.Object