Class MemPatriciaBranchNode
java.lang.Object
com.norswap.nanoeth.trees.patricia.PatriciaNode
com.norswap.nanoeth.trees.patricia.PatriciaBranchNode
com.norswap.nanoeth.trees.patricia.memory.MemPatriciaBranchNode
public final class MemPatriciaBranchNode extends PatriciaBranchNode
A branch node in the in-memory patricia tree.
-
Field Summary
Fields inherited from class com.norswap.nanoeth.trees.patricia.PatriciaNode
cap -
Constructor Summary
Constructors Constructor Description MemPatriciaBranchNode(byte[] value, PatriciaNode[] children) -
Method Summary
Modifier and Type Method Description PatriciaNodechildAt(NodeStore store, int nibble)Returns the child node with the given starting nibble, or null if there is no such child.byte[]childCapAt(int nibble)Returns the cap value ofPatriciaBranchNode.childAt(NodeStore, int)with parameternibble, or null if there is no such child.booleanequals(Object o)booleanhasChildAt(int nibble)Returns true only if the branch node has a child with the given starting nibble.inthashCode()StringtoString()byte[]value()Returns the value associated with this leaf node, or null if no value is associated.Methods inherited from class com.norswap.nanoeth.trees.patricia.PatriciaBranchNode
add, childAndValueCount, collectEntries, compose, lookup, remove, stepMethods inherited from class com.norswap.nanoeth.trees.patricia.PatriciaNode
cap, merkleRoot, parse
-
Constructor Details
-
MemPatriciaBranchNode
-
-
Method Details
-
value
Description copied from class:PatriciaBranchNodeReturns the value associated with this leaf node, or null if no value is associated.- Specified by:
valuein classPatriciaBranchNode
-
hasChildAt
public boolean hasChildAt(int nibble)Description copied from class:PatriciaBranchNodeReturns true only if the branch node has a child with the given starting nibble.- Specified by:
hasChildAtin classPatriciaBranchNode
-
childAt
Description copied from class:PatriciaBranchNodeReturns the child node with the given starting nibble, or null if there is no such child.- Specified by:
childAtin classPatriciaBranchNode
-
childCapAt
Description copied from class:PatriciaBranchNodeReturns the cap value ofPatriciaBranchNode.childAt(NodeStore, int)with parameternibble, or null if there is no such child.This is a separate method because in the abridged representation, the children's cap values are stored directly, but not the children themselves.
- Specified by:
childCapAtin classPatriciaBranchNode
-
equals
-
hashCode
public int hashCode() -
toString
-