Package org.kiwiproject.consul.model.kv
Class ImmutableTxError
java.lang.Object
org.kiwiproject.consul.model.kv.TxError
org.kiwiproject.consul.model.kv.ImmutableTxError
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableTxError
extends TxError
Immutable implementation of
TxError.
Use the builder to create immutable instances:
ImmutableTxError.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableTxError.Builderbuilder()Creates a builder forImmutableTxError.static ImmutableTxErrorCreates an immutable copy of aTxErrorvalue.booleanThis instance is equal to all instances ofImmutableTxErrorthat have equal attribute values.inthashCode()Computes a hash code from attributes:opIndex,what.opIndex()toString()Prints the immutable valueTxErrorwith attribute values.what()final ImmutableTxErrorwithOpIndex(BigInteger value) Copy the current immutable object by setting a present value for the optionalopIndexattribute.final ImmutableTxErrorwithOpIndex(Optional<? extends BigInteger> optional) Copy the current immutable object by setting an optional value for theopIndexattribute.final ImmutableTxErrorCopy the current immutable object by setting a present value for the optionalwhatattribute.final ImmutableTxErrorCopy the current immutable object by setting an optional value for thewhatattribute.
-
Method Details
-
opIndex
-
what
-
withOpIndex
Copy the current immutable object by setting a present value for the optionalopIndexattribute.- Parameters:
value- The value for opIndex- Returns:
- A modified copy of
thisobject
-
withOpIndex
Copy the current immutable object by setting an optional value for theopIndexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for opIndex- Returns:
- A modified copy of
thisobject
-
withWhat
Copy the current immutable object by setting a present value for the optionalwhatattribute.- Parameters:
value- The value for what- Returns:
- A modified copy of
thisobject
-
withWhat
Copy the current immutable object by setting an optional value for thewhatattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for what- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableTxErrorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:opIndex,what. -
toString
Prints the immutable valueTxErrorwith attribute values. -
copyOf
Creates an immutable copy of aTxErrorvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable TxError instance
-
builder
Creates a builder forImmutableTxError.ImmutableTxError.builder() .opIndex(java.math.BigInteger) // optionalopIndex.what(String) // optionalwhat.build();- Returns:
- A new ImmutableTxError builder
-