Class ImmutableSignature
- All Implemented Interfaces:
Signature
Signature.
Use the builder to create immutable instances:
ImmutableSignature.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionAccessor for this signature as a base16-encoded (HEX) string.static ImmutableSignature.Builderbuilder()Creates a builder forImmutableSignature.static ImmutableSignatureCreates an immutable copy of aSignaturevalue.booleanThis instance is equal to all instances ofImmutableSignaturethat have equal attribute values.inthashCode()Computes a hash code from attributes:value.hexValue()Accessor for this signature as a base16-encoded (HEX) string.toString()Prints the immutable valueSignaturewith attribute values.value()The bytes of this signature.final ImmutableSignaturewithValue(UnsignedByteArray value) Copy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
value
The bytes of this signature.- Specified by:
valuein interfaceSignature- Returns:
- A
UnsignedByteArray.
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableSignaturethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:value. -
toString
Prints the immutable valueSignaturewith attribute values. -
base16Value
Accessor for this signature as a base16-encoded (HEX) string.Returns a lazily initialized value of the
base16Valueattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.- Specified by:
base16Valuein interfaceSignature- Returns:
- A lazily initialized value of the
base16Valueattribute
-
hexValue
Accessor for this signature as a base16-encoded (HEX) string.Returns a lazily initialized value of the
hexValueattribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again. -
copyOf
Creates an immutable copy of aSignaturevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Signature instance
-
builder
Creates a builder forImmutableSignature.ImmutableSignature.builder() .value(org.xrpl.xrpl4j.codec.addresses.UnsignedByteArray) // requiredvalue.build();- Returns:
- A new ImmutableSignature builder
-