Package org.xrpl.xrpl4j.model.ledger
Class ImmutableIssue.Builder
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableIssue.Builder
- Enclosing class:
ImmutableIssue
Builds instances of type
ImmutableIssue.
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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableIssue.final ImmutableIssue.BuilderInitializes the value for thecurrencyattribute.final ImmutableIssue.BuilderFill a builder with attribute values from the providedIssueinstance.final ImmutableIssue.BuilderInitializes the optional valueissuerto issuer.final ImmutableIssue.BuilderInitializes the optional valueissuerto issuer.
-
Method Details
-
from
Fill a builder with attribute values from the providedIssueinstance. 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:
thisbuilder for use in a chained invocation
-
currency
Initializes the value for thecurrencyattribute.- Parameters:
currency- The value for currency- Returns:
thisbuilder for use in a chained invocation
-
issuer
Initializes the optional valueissuerto issuer.- Parameters:
issuer- The value for issuer- Returns:
thisbuilder for chained invocation
-
issuer
@CanIgnoreReturnValue public final ImmutableIssue.Builder issuer(Optional<? extends Address> issuer) Initializes the optional valueissuerto issuer.- Parameters:
issuer- The value for issuer- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableIssue.- Returns:
- An immutable instance of Issue
- Throws:
IllegalStateException- if any required attributes are missing
-