Class ImmutableCredentialObject.Builder

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableCredentialObject.Builder
Enclosing class:
ImmutableCredentialObject

@NotThreadSafe public static final class ImmutableCredentialObject.Builder extends Object
Builds instances of type ImmutableCredentialObject. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder from(CredentialObject instance)
      Fill a builder with attribute values from the provided CredentialObject instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • subject

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder subject(Address subject)
      Initializes the value for the subject attribute.
      Parameters:
      subject - The value for subject
      Returns:
      this builder for use in a chained invocation
    • subjectNode

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder subjectNode(String subjectNode)
      Initializes the value for the subjectNode attribute.
      Parameters:
      subjectNode - The value for subjectNode
      Returns:
      this builder for use in a chained invocation
    • issuer

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder issuer(Address issuer)
      Initializes the value for the issuer attribute.
      Parameters:
      issuer - The value for issuer
      Returns:
      this builder for use in a chained invocation
    • issuerNode

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder issuerNode(String issuerNode)
      Initializes the value for the issuerNode attribute.
      Parameters:
      issuerNode - The value for issuerNode
      Returns:
      this builder for use in a chained invocation
    • flags

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder flags(CredentialFlags flags)
      Initializes the value for the flags attribute.
      Parameters:
      flags - The value for flags
      Returns:
      this builder for use in a chained invocation
    • previousTxnId

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder previousTxnId(Hash256 previousTxnId)
      Initializes the value for the previousTxnId attribute.
      Parameters:
      previousTxnId - The value for previousTxnId
      Returns:
      this builder for use in a chained invocation
    • previousTransactionLedgerSequence

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence)
      Initializes the value for the previousTransactionLedgerSequence attribute.
      Parameters:
      previousTransactionLedgerSequence - The value for previousTransactionLedgerSequence
      Returns:
      this builder for use in a chained invocation
    • credentialType

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder credentialType(CredentialType credentialType)
      Initializes the value for the credentialType attribute.
      Parameters:
      credentialType - The value for credentialType
      Returns:
      this builder for use in a chained invocation
    • uri

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder uri(CredentialUri uri)
      Initializes the optional value uri to uri.
      Parameters:
      uri - The value for uri
      Returns:
      this builder for chained invocation
    • uri

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder uri(Optional<? extends CredentialUri> uri)
      Initializes the optional value uri to uri.
      Parameters:
      uri - The value for uri
      Returns:
      this builder for use in a chained invocation
    • expiration

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder expiration(com.google.common.primitives.UnsignedInteger expiration)
      Initializes the optional value expiration to expiration.
      Parameters:
      expiration - The value for expiration
      Returns:
      this builder for chained invocation
    • expiration

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder expiration(Optional<? extends com.google.common.primitives.UnsignedInteger> expiration)
      Initializes the optional value expiration to expiration.
      Parameters:
      expiration - The value for expiration
      Returns:
      this builder for use in a chained invocation
    • index

      @CanIgnoreReturnValue public final ImmutableCredentialObject.Builder index(Hash256 index)
      Initializes the value for the index attribute.
      Parameters:
      index - The value for index
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableCredentialObject build()
      Returns:
      An immutable instance of CredentialObject
      Throws:
      IllegalStateException - if any required attributes are missing