Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class EvmHookMappingEntry.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<EvmHookMappingEntry,EvmHookMappingEntry.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<EvmHookMappingEntry,EvmHookMappingEntry.Builder>
com.hedera.hashgraph.sdk.proto.EvmHookMappingEntry.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,EvmHookMappingEntryOrBuilder,Cloneable
- Enclosing class:
EvmHookMappingEntry
public static final class EvmHookMappingEntry.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<EvmHookMappingEntry,EvmHookMappingEntry.Builder>
implements EvmHookMappingEntryOrBuilder
* An entry in a Solidity mapping. Very helpful for protocols that apply `HookStore` to manage the entries of a hook contract's mapping instead its raw storage slots. <p> This is especially attractive when the mapping value itself fits in a single word; for more complicated value storage layouts it becomes necessary to combine the mapping update with additional `EvmHookStorageSlot` updates that specify the complete storage slots of the value type.Protobuf type
com.hedera.hapi.node.hooks.EvmHookMappingEntry-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionclearKey()* The explicit bytes of the mapping entry.* The bytes that are the preimage of the Keccak256 hash that forms the mapping key.* If the mapping entry is present and non-zero, its value.com.google.protobuf.ByteStringgetKey()* The explicit bytes of the mapping entry.com.google.protobuf.ByteString* The bytes that are the preimage of the Keccak256 hash that forms the mapping key.com.google.protobuf.ByteStringgetValue()* If the mapping entry is present and non-zero, its value.booleanhasKey()* The explicit bytes of the mapping entry.boolean* The bytes that are the preimage of the Keccak256 hash that forms the mapping key.setKey(com.google.protobuf.ByteString value) * The explicit bytes of the mapping entry.setPreimage(com.google.protobuf.ByteString value) * The bytes that are the preimage of the Keccak256 hash that forms the mapping key.setValue(com.google.protobuf.ByteString value) * If the mapping entry is present and non-zero, its value.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getEntryKeyCase
- Specified by:
getEntryKeyCasein interfaceEvmHookMappingEntryOrBuilder
-
clearEntryKey
-
hasKey
public boolean hasKey()* The explicit bytes of the mapping entry. Must use a minimal byte representation; may not exceed 32 bytes in length.
bytes key = 1;- Specified by:
hasKeyin interfaceEvmHookMappingEntryOrBuilder- Returns:
- Whether the key field is set.
-
getKey
public com.google.protobuf.ByteString getKey()* The explicit bytes of the mapping entry. Must use a minimal byte representation; may not exceed 32 bytes in length.
bytes key = 1;- Specified by:
getKeyin interfaceEvmHookMappingEntryOrBuilder- Returns:
- The key.
-
setKey
* The explicit bytes of the mapping entry. Must use a minimal byte representation; may not exceed 32 bytes in length.
bytes key = 1;- Parameters:
value- The key to set.- Returns:
- This builder for chaining.
-
clearKey
* The explicit bytes of the mapping entry. Must use a minimal byte representation; may not exceed 32 bytes in length.
bytes key = 1;- Returns:
- This builder for chaining.
-
hasPreimage
public boolean hasPreimage()* The bytes that are the preimage of the Keccak256 hash that forms the mapping key. May be longer or shorter than 32 bytes and may have leading zeros, since Solidity supports variable-length keys in mappings.
bytes preimage = 2;- Specified by:
hasPreimagein interfaceEvmHookMappingEntryOrBuilder- Returns:
- Whether the preimage field is set.
-
getPreimage
public com.google.protobuf.ByteString getPreimage()* The bytes that are the preimage of the Keccak256 hash that forms the mapping key. May be longer or shorter than 32 bytes and may have leading zeros, since Solidity supports variable-length keys in mappings.
bytes preimage = 2;- Specified by:
getPreimagein interfaceEvmHookMappingEntryOrBuilder- Returns:
- The preimage.
-
setPreimage
* The bytes that are the preimage of the Keccak256 hash that forms the mapping key. May be longer or shorter than 32 bytes and may have leading zeros, since Solidity supports variable-length keys in mappings.
bytes preimage = 2;- Parameters:
value- The preimage to set.- Returns:
- This builder for chaining.
-
clearPreimage
* The bytes that are the preimage of the Keccak256 hash that forms the mapping key. May be longer or shorter than 32 bytes and may have leading zeros, since Solidity supports variable-length keys in mappings.
bytes preimage = 2;- Returns:
- This builder for chaining.
-
getValue
public com.google.protobuf.ByteString getValue()* If the mapping entry is present and non-zero, its value. May not be longer than 32 bytes in length; must use a minimal byte representation (no leading zeros). Leaving this field empty in an update removes the entry from the mapping.
bytes value = 3;- Specified by:
getValuein interfaceEvmHookMappingEntryOrBuilder- Returns:
- The value.
-
setValue
* If the mapping entry is present and non-zero, its value. May not be longer than 32 bytes in length; must use a minimal byte representation (no leading zeros). Leaving this field empty in an update removes the entry from the mapping.
bytes value = 3;- Parameters:
value- The value to set.- Returns:
- This builder for chaining.
-
clearValue
* If the mapping entry is present and non-zero, its value. May not be longer than 32 bytes in length; must use a minimal byte representation (no leading zeros). Leaving this field empty in an update removes the entry from the mapping.
bytes value = 3;- Returns:
- This builder for chaining.
-