Class MerkleTree


  • public class MerkleTree
    extends Object

    MerkleTree class.

    • Constructor Detail

      • MerkleTree

        public MerkleTree​(int total)

        Constructor for MerkleTree.

        Parameters:
        total - a int
    • Method Detail

      • up

        public void up()

        up.

      • left

        public void left()

        left.

      • right

        public void right()

        right.

      • root

        public byte[] root()

        root.

        Returns:
        an array of byte objects
      • setCurrentNode

        public void setCurrentNode​(byte[] value)

        setCurrentNode.

        Parameters:
        value - an array of byte objects
      • getCurrentNode

        public byte[] getCurrentNode()

        getCurrentNode.

        Returns:
        an array of byte objects
      • getLeftNode

        public byte[] getLeftNode()

        getLeftNode.

        Returns:
        an array of byte objects
      • getRightNode

        public byte[] getRightNode()

        getRightNode.

        Returns:
        an array of byte objects
      • isLeaf

        public boolean isLeaf()

        isLeaf.

        Returns:
        a boolean
      • rightExists

        public boolean rightExists()

        rightExists.

        Returns:
        a boolean
      • populateTree

        public void populateTree​(byte[] flagBits,
                                 List<byte[]> hashes)

        populateTree.

        Parameters:
        flagBits - an array of byte objects
        hashes - a List object