Class ImmutableMemo.Builder
java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableMemo.Builder
- Enclosing class:
ImmutableMemo
Builds instances of type
ImmutableMemo.
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 newImmutableMemo.final ImmutableMemo.BuilderFill a builder with attribute values from the providedMemoinstance.final ImmutableMemo.BuilderInitializes the optional valuememoDatato memoData.final ImmutableMemo.BuilderInitializes the optional valuememoDatato memoData.final ImmutableMemo.BuildermemoFormat(String memoFormat) Initializes the optional valuememoFormatto memoFormat.final ImmutableMemo.BuildermemoFormat(Optional<String> memoFormat) Initializes the optional valuememoFormatto memoFormat.final ImmutableMemo.BuilderInitializes the optional valuememoTypeto memoType.final ImmutableMemo.BuilderInitializes the optional valuememoTypeto memoType.
-
Method Details
-
from
Fill a builder with attribute values from the providedMemoinstance. 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
-
memoData
Initializes the optional valuememoDatato memoData.- Parameters:
memoData- The value for memoData- Returns:
thisbuilder for chained invocation
-
memoData
Initializes the optional valuememoDatato memoData.- Parameters:
memoData- The value for memoData- Returns:
thisbuilder for use in a chained invocation
-
memoFormat
Initializes the optional valuememoFormatto memoFormat.- Parameters:
memoFormat- The value for memoFormat- Returns:
thisbuilder for chained invocation
-
memoFormat
Initializes the optional valuememoFormatto memoFormat.- Parameters:
memoFormat- The value for memoFormat- Returns:
thisbuilder for use in a chained invocation
-
memoType
Initializes the optional valuememoTypeto memoType.- Parameters:
memoType- The value for memoType- Returns:
thisbuilder for chained invocation
-
memoType
Initializes the optional valuememoTypeto memoType.- Parameters:
memoType- The value for memoType- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableMemo.- Returns:
- An immutable instance of Memo
- Throws:
IllegalStateException- if any required attributes are missing
-