public class CheckedFlatMapProof extends java.lang.Object implements CheckedMapProof
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(com.google.protobuf.ByteString key)
If this proof is valid, returns true if there is a given key in the proof;
false — if there is no such key.
|
static CheckedFlatMapProof |
correct(HashCode rootHash,
java.util.Set<MapEntry> entries,
java.util.Set<com.google.protobuf.ByteString> missingKeys)
Creates a valid map proof.
|
com.google.protobuf.ByteString |
get(com.google.protobuf.ByteString key)
If this proof is valid, returns the value corresponding to the specified key
or null if there is no such key in the proof.
|
java.util.Set<MapEntry> |
getEntries()
Get all leaf entries of this proof.
|
java.util.Set<com.google.protobuf.ByteString> |
getMissingKeys()
Get all keys that were requested, but did not appear in this proof.
|
MapProofStatus |
getProofStatus()
Returns the status of this proof: whether it is structurally valid.
|
HashCode |
getRootHash()
Returns the calculated root hash of the proof.
|
static CheckedFlatMapProof |
invalid(MapProofStatus status)
Creates an invalid map proof.
|
boolean |
isValid()
Returns true if proof status is valid, false otherwise.
|
public static CheckedFlatMapProof correct(HashCode rootHash, java.util.Set<MapEntry> entries, java.util.Set<com.google.protobuf.ByteString> missingKeys)
rootHash - the Merkle root hash calculated by the validatorentries - the set of entries that are proved to be in the mapmissingKeys - the set of keys that are proved not to be in the mappublic static CheckedFlatMapProof invalid(MapProofStatus status)
status - the status explaining why the proof is not valid;
must not be MapProofStatus.CORRECTpublic java.util.Set<MapEntry> getEntries()
CheckedMapProofgetEntries in interface CheckedMapProofpublic java.util.Set<com.google.protobuf.ByteString> getMissingKeys()
CheckedMapProofgetMissingKeys in interface CheckedMapProofpublic boolean containsKey(com.google.protobuf.ByteString key)
CheckedMapProofcontainsKey in interface CheckedMapProofpublic HashCode getRootHash()
CheckedProofgetRootHash in interface CheckedProofpublic com.google.protobuf.ByteString get(com.google.protobuf.ByteString key)
CheckedMapProofget in interface CheckedMapProofpublic MapProofStatus getProofStatus()
CheckedMapProofgetProofStatus in interface CheckedProofgetProofStatus in interface CheckedMapProofpublic boolean isValid()
CheckedProofCheckedProof.getProofStatus().isValid in interface CheckedProofCopyright © 2018 Exonum. All rights reserved.