Class ImmutableTxError.Builder

java.lang.Object
org.kiwiproject.consul.model.kv.ImmutableTxError.Builder
Enclosing class:
ImmutableTxError

public static final class ImmutableTxError.Builder extends Object
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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableTxError.Builder from(TxError instance)
      Fill a builder with attribute values from the provided TxError instance. 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:
      this builder for use in a chained invocation
    • opIndex

      @CanIgnoreReturnValue public final ImmutableTxError.Builder opIndex(BigInteger opIndex)
      Initializes the optional value opIndex to opIndex.
      Parameters:
      opIndex - The value for opIndex
      Returns:
      this builder for chained invocation
    • opIndex

      @CanIgnoreReturnValue public final ImmutableTxError.Builder opIndex(Optional<? extends BigInteger> opIndex)
      Initializes the optional value opIndex to opIndex.
      Parameters:
      opIndex - The value for opIndex
      Returns:
      this builder for use in a chained invocation
    • what

      @CanIgnoreReturnValue public final ImmutableTxError.Builder what(String what)
      Initializes the optional value what to what.
      Parameters:
      what - The value for what
      Returns:
      this builder for chained invocation
    • what

      @CanIgnoreReturnValue public final ImmutableTxError.Builder what(Optional<String> what)
      Initializes the optional value what to what.
      Parameters:
      what - The value for what
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableTxError build()
      Builds a new ImmutableTxError.
      Returns:
      An immutable instance of TxError
      Throws:
      IllegalStateException - if any required attributes are missing