Class ListProofBranch
- java.lang.Object
-
- com.exonum.binding.common.proofs.list.ListProofBranch
-
- All Implemented Interfaces:
ListProofNode
public final class ListProofBranch extends Object implements ListProofNode
Represents a branch node of aListProofNode.A branch node always has a left child, but there might not be a right child (if the underlying Merkle tree is not a full binary tree).
-
-
Constructor Summary
Constructors Constructor Description ListProofBranch(ListProofNode left, ListProofNode right)
-
Method Summary
Modifier and Type Method Description voidaccept(ListProofVisitor visitor)Applies the visitor to this proof node.ListProofNodegetLeft()Returns the left child in the proof tree.Optional<ListProofNode>getRight()Returns the right child in the proof tree.
-
-
-
Constructor Detail
-
ListProofBranch
public ListProofBranch(ListProofNode left, @Nullable ListProofNode right)
-
-
Method Detail
-
accept
public void accept(ListProofVisitor visitor)
Description copied from interface:ListProofNodeApplies the visitor to this proof node.Most implementations simply call
visitor.visit(this);- Specified by:
acceptin interfaceListProofNode- Parameters:
visitor- a visitor to apply to this node
-
getLeft
public ListProofNode getLeft()
Returns the left child in the proof tree.
-
getRight
public Optional<ListProofNode> getRight()
Returns the right child in the proof tree.There might not be a right child if the Merkle tree of the ProofList is not a full binary tree.
-
-