Record Class SegmentedKeyValueStorage.NearestKeyValue
java.lang.Object
java.lang.Record
org.hyperledger.besu.plugin.services.storage.SegmentedKeyValueStorage.NearestKeyValue
- Record Components:
key- the matched (nearest) keyvalue- the corresponding value
- Enclosing interface:
SegmentedKeyValueStorage
-
Constructor Summary
ConstructorsConstructorDescriptionNearestKeyValue(org.apache.tuweni.bytes.Bytes key, Optional<byte[]> value) Creates an instance of aNearestKeyValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.apache.tuweni.bytes.Byteskey()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.Optional<byte[]> value()Returns the value of thevaluerecord component.Optional<org.apache.tuweni.bytes.Bytes> Convenience method to map the Optional value to Bytes.
-
Constructor Details
-
NearestKeyValue
-
-
Method Details
-
wrapBytes
Convenience method to map the Optional value to Bytes.- Returns:
- Optional of Bytes.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
key
-
value
-