Class ListProofBranch
- java.lang.Object
-
- com.exonum.binding.common.proofs.list.ListProofBranch
-
- All Implemented Interfaces:
ListProofNode
public final class ListProofBranch extends java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ListProofVisitor visitor)
Applies the visitor to this proof node.ListProofNode
getLeft()
Returns the left child in the proof tree.java.util.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:ListProofNode
Applies the visitor to this proof node.Most implementations simply call
visitor.visit(this);
- Specified by:
accept
in interfaceListProofNode
- Parameters:
visitor
- a visitor to apply to this node
-
getLeft
public ListProofNode getLeft()
Returns the left child in the proof tree.
-
getRight
public java.util.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.
-
-