@NotThreadSafe public static final class ImmutableTxResponse.Builder extends Object
ImmutableTxResponse.
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.
@CanIgnoreReturnValue public final ImmutableTxResponse.Builder from(TxResponse instance)
TxResponse instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTxResponse.Builder addResults(Map<String,Value> element)
results list.element - A results elementthis builder for use in a chained invocation@CanIgnoreReturnValue @SafeVarargs public final ImmutableTxResponse.Builder addResults(Map<String,Value>... elements)
results list.elements - An array of results elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTxResponse.Builder results(Iterable<? extends Map<String,Value>> elements)
results list.elements - An iterable of results elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTxResponse.Builder addAllResults(Iterable<? extends Map<String,Value>> elements)
results list.elements - An iterable of results elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTxResponse.Builder addErrors(TxError element)
errors list.element - A errors elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTxResponse.Builder addErrors(TxError... elements)
errors list.elements - An array of errors elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTxResponse.Builder errors(Iterable<? extends TxError> elements)
errors list.elements - An iterable of errors elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableTxResponse.Builder addAllErrors(Iterable<? extends TxError> elements)
errors list.elements - An iterable of errors elementsthis builder for use in a chained invocationpublic ImmutableTxResponse build()
ImmutableTxResponse.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.