Class ImmutableCredential
java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableCredential
- All Implemented Interfaces:
Credential
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableCredential
extends Object
implements Credential
Immutable implementation of
Credential.
Use the builder to create immutable instances:
ImmutableCredential.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCredential. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableCredential.Builderbuilder()Creates a builder forImmutableCredential.static ImmutableCredentialcopyOf(Credential instance) Creates an immutable copy of aCredentialvalue.A (hex-encoded) value to identify the type of credential from the issuer.booleanThis instance is equal to all instances ofImmutableCredentialthat have equal attribute values.inthashCode()Computes a hash code from attributes:issuer,credentialType.issuer()The issuer of the credential.toString()Prints the immutable valueCredentialwith attribute values.final ImmutableCredentialwithCredentialType(CredentialType value) Copy the current immutable object by setting a value for thecredentialTypeattribute.final ImmutableCredentialwithIssuer(Address value) Copy the current immutable object by setting a value for theissuerattribute.
-
Method Details
-
issuer
The issuer of the credential.- Specified by:
issuerin interfaceCredential- Returns:
- The
Addressof the issuer this credential.
-
credentialType
A (hex-encoded) value to identify the type of credential from the issuer.- Specified by:
credentialTypein interfaceCredential- Returns:
- The
CredentialTypedenoting the CredentialType
-
withIssuer
Copy the current immutable object by setting a value for theissuerattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for issuer- Returns:
- A modified copy of the
thisobject
-
withCredentialType
Copy the current immutable object by setting a value for thecredentialTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for credentialType- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableCredentialthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:issuer,credentialType. -
toString
Prints the immutable valueCredentialwith attribute values. -
copyOf
Creates an immutable copy of aCredentialvalue. 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 Credential instance
-
builder
Creates a builder forImmutableCredential.ImmutableCredential.builder() .issuer(org.xrpl.xrpl4j.model.transactions.Address) // requiredissuer.credentialType(org.xrpl.xrpl4j.model.transactions.CredentialType) // requiredcredentialType.build();- Returns:
- A new ImmutableCredential builder
-