Class ImmutableTxError


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableTxError
    extends TxError
    Immutable implementation of TxError.

    Use the builder to create immutable instances: ImmutableTxError.builder().

    • Method Summary

      Modifier and Type Method Description
      static ImmutableTxError.Builder builder()
      Creates a builder for ImmutableTxError.
      static ImmutableTxError copyOf​(TxError instance)
      Creates an immutable copy of a TxError value.
      boolean equals​(java.lang.Object another)
      This instance is equal to all instances of ImmutableTxError that have equal attribute values.
      int hashCode()
      Computes a hash code from attributes: opIndex, what.
      java.util.Optional<java.math.BigInteger> opIndex()  
      java.lang.String toString()
      Prints the immutable value TxError with attribute values.
      java.util.Optional<java.lang.String> what()  
      ImmutableTxError withOpIndex​(java.math.BigInteger value)
      Copy the current immutable object by setting a present value for the optional opIndex attribute.
      ImmutableTxError withOpIndex​(java.util.Optional<? extends java.math.BigInteger> optional)
      Copy the current immutable object by setting an optional value for the opIndex attribute.
      ImmutableTxError withWhat​(java.lang.String value)
      Copy the current immutable object by setting a present value for the optional what attribute.
      ImmutableTxError withWhat​(java.util.Optional<java.lang.String> optional)
      Copy the current immutable object by setting an optional value for the what attribute.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • opIndex

        public java.util.Optional<java.math.BigInteger> opIndex()
        Specified by:
        opIndex in class TxError
        Returns:
        The value of the opIndex attribute
      • what

        public java.util.Optional<java.lang.String> what()
        Specified by:
        what in class TxError
        Returns:
        The value of the what attribute
      • withOpIndex

        public final ImmutableTxError withOpIndex​(java.math.BigInteger value)
        Copy the current immutable object by setting a present value for the optional opIndex attribute.
        Parameters:
        value - The value for opIndex
        Returns:
        A modified copy of this object
      • withOpIndex

        public final ImmutableTxError withOpIndex​(java.util.Optional<? extends java.math.BigInteger> optional)
        Copy the current immutable object by setting an optional value for the opIndex attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for opIndex
        Returns:
        A modified copy of this object
      • withWhat

        public final ImmutableTxError withWhat​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional what attribute.
        Parameters:
        value - The value for what
        Returns:
        A modified copy of this object
      • withWhat

        public final ImmutableTxError withWhat​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the what attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for what
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableTxError that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: opIndex, what.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value TxError with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableTxError copyOf​(TxError instance)
        Creates an immutable copy of a TxError value. 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

        public static ImmutableTxError.Builder builder()
        Creates a builder for ImmutableTxError.
         ImmutableTxError.builder()
            .opIndex(java.math.BigInteger) // optional opIndex
            .what(String) // optional what
            .build();
         
        Returns:
        A new ImmutableTxError builder