Package org.kiwiproject.consul.model.kv
Class ImmutableTxError.Builder
java.lang.Object
org.kiwiproject.consul.model.kv.ImmutableTxError.Builder
- Enclosing class:
- ImmutableTxError
Builds instances of type
ImmutableTxError.
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 newImmutableTxError.final ImmutableTxError.BuilderFill a builder with attribute values from the providedTxErrorinstance.final ImmutableTxError.BuilderopIndex(BigInteger opIndex) Initializes the optional valueopIndexto opIndex.final ImmutableTxError.BuilderopIndex(Optional<? extends BigInteger> opIndex) Initializes the optional valueopIndexto opIndex.final ImmutableTxError.BuilderInitializes the optional valuewhatto what.final ImmutableTxError.BuilderInitializes the optional valuewhatto what.
-
Method Details
-
from
Fill a builder with attribute values from the providedTxErrorinstance. 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
-
opIndex
Initializes the optional valueopIndexto opIndex.- Parameters:
opIndex- The value for opIndex- Returns:
thisbuilder for chained invocation
-
opIndex
@CanIgnoreReturnValue public final ImmutableTxError.Builder opIndex(Optional<? extends BigInteger> opIndex) Initializes the optional valueopIndexto opIndex.- Parameters:
opIndex- The value for opIndex- Returns:
thisbuilder for use in a chained invocation
-
what
Initializes the optional valuewhatto what.- Parameters:
what- The value for what- Returns:
thisbuilder for chained invocation
-
what
Initializes the optional valuewhatto what.- Parameters:
what- The value for what- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableTxError.- Returns:
- An immutable instance of TxError
- Throws:
IllegalStateException- if any required attributes are missing
-