Package org.xrpl.xrpl4j.keypairs
Class ImmutableEcDsaSignature
- java.lang.Object
-
- org.xrpl.xrpl4j.keypairs.ImmutableEcDsaSignature
-
- All Implemented Interfaces:
EcDsaSignature
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEcDsaSignature extends Object implements EcDsaSignature
Immutable implementation ofEcDsaSignature
.Use the builder to create immutable instances:
ImmutableEcDsaSignature.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableEcDsaSignature.Builder
Builds instances of typeImmutableEcDsaSignature
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableEcDsaSignature.Builder
builder()
Creates a builder forImmutableEcDsaSignature
.static ImmutableEcDsaSignature
copyOf(EcDsaSignature instance)
Creates an immutable copy of aEcDsaSignature
value.UnsignedByteArray
der()
Encode thisEcDsaSignature
to the ASN.1 DER format.boolean
equals(Object another)
This instance is equal to all instances ofImmutableEcDsaSignature
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:r
,s
,der
.BigInteger
r()
The r component of thisEcDsaSignature
.BigInteger
s()
The s component of thisEcDsaSignature
.String
toString()
Prints the immutable valueEcDsaSignature
with attribute values.ImmutableEcDsaSignature
withR(BigInteger value)
Copy the current immutable object by setting a value for ther
attribute.ImmutableEcDsaSignature
withS(BigInteger value)
Copy the current immutable object by setting a value for thes
attribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.xrpl.xrpl4j.keypairs.EcDsaSignature
isStrictlyCanonical
-
-
-
-
Method Detail
-
r
public BigInteger r()
The r component of thisEcDsaSignature
.- Specified by:
r
in interfaceEcDsaSignature
- Returns:
- A
BigInteger
denoting the r component of this signature.
-
s
public BigInteger s()
The s component of thisEcDsaSignature
.- Specified by:
s
in interfaceEcDsaSignature
- Returns:
- A
BigInteger
denoting the r component of this signature.
-
der
public UnsignedByteArray der()
Encode thisEcDsaSignature
to the ASN.1 DER format.- Specified by:
der
in interfaceEcDsaSignature
- Returns:
- An
UnsignedByteArray
containing the bytes of the encoded signature.
-
withR
public final ImmutableEcDsaSignature withR(BigInteger value)
Copy the current immutable object by setting a value for ther
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for r- Returns:
- A modified copy of the
this
object
-
withS
public final ImmutableEcDsaSignature withS(BigInteger value)
Copy the current immutable object by setting a value for thes
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for s- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableEcDsaSignature
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:r
,s
,der
.
-
toString
public String toString()
Prints the immutable valueEcDsaSignature
with attribute values.
-
copyOf
public static ImmutableEcDsaSignature copyOf(EcDsaSignature instance)
Creates an immutable copy of aEcDsaSignature
value. 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 EcDsaSignature instance
-
builder
public static ImmutableEcDsaSignature.Builder builder()
Creates a builder forImmutableEcDsaSignature
.ImmutableEcDsaSignature.builder() .r(java.math.BigInteger) // required
r
.s(java.math.BigInteger) // requireds
.build();- Returns:
- A new ImmutableEcDsaSignature builder
-
-