use of io.nem.symbol.sdk.model.state.MerkleTreeBranchLink in project nem2-sdk-java by nemtech.
the class MerkleMapper method toMerkleTreeBranch.
private MerkleTreeBranch toMerkleTreeBranch(Object dto, MerkleTreeNodeType type) {
MerkleTreeBranchDTO branch = getJsonHelper().convert(dto, MerkleTreeBranchDTO.class);
List<MerkleTreeBranchLink> links = branch.getLinks().stream().map(link -> new MerkleTreeBranchLink(link.getBit(), link.getLink())).collect(Collectors.toList());
return new MerkleTreeBranch(type, branch.getPath(), branch.getEncodedPath(), branch.getLinkMask(), links, branch.getBranchHash());
}
use of io.nem.symbol.sdk.model.state.MerkleTreeBranchLink in project nem2-sdk-java by nemtech.
the class MerkleMapper method toMerkleTreeBranch.
private io.nem.symbol.sdk.model.state.MerkleTreeBranch toMerkleTreeBranch(Object dto, MerkleTreeNodeType type) {
MerkleTreeBranchDTO branch = getJsonHelper().convert(dto, MerkleTreeBranchDTO.class);
List<MerkleTreeBranchLink> links = branch.getLinks().stream().map(link -> new MerkleTreeBranchLink(link.getBit(), link.getLink())).collect(Collectors.toList());
return new io.nem.symbol.sdk.model.state.MerkleTreeBranch(type, branch.getPath(), branch.getEncodedPath(), branch.getLinkMask(), links, branch.getBranchHash());
}
Aggregations