Class ListProofBranch

  • All Implemented Interfaces:
    ListProofNode

    public final class ListProofBranch
    extends Object
    implements ListProofNode
    Represents a branch node of a ListProofNode.

    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).

    • 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 interface ListProofNode
        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.