public class MerkleTree<T extends HashLeaf> extends Object implements Serializable
| Constructor and Description |
|---|
MerkleTree() |
MerkleTree(List<T> leaves)
Creates Merkle Tree with default dimension with the given leaves
|
MerkleTree(List<T> leaves,
int dimensions)
Creates Merkle Tree with specified dimension with the given leaves
|
| Modifier and Type | Method and Description |
|---|---|
List<T> |
diff(MerkleTree other)
Diff current tree against another using depth-first.
|
boolean |
equals(Object o) |
Integer |
getDimensions() |
Integer |
getNumLeaves() |
Node |
getTopHash()
Accessor for the root of the tree
|
int |
hashCode() |
String |
toString() |
public MerkleTree()
public MerkleTree(List<T> leaves) throws IllegalStateException
leaves - IllegalStateExceptionpublic MerkleTree(List<T> leaves, int dimensions) throws IllegalStateException
leaves - dimensions - IllegalStateExceptionpublic Node getTopHash()
public Integer getDimensions()
public Integer getNumLeaves()
public List<T> diff(MerkleTree other)
other - Copyright © 2014 Calrissian. All rights reserved.