Class ImmutableExtendResult

  • All Implemented Interfaces:
    ExtendResult

    @Generated("org.immutables.processor.ProxyProcessor")
    public final class ImmutableExtendResult
    extends Object
    implements ExtendResult
    Immutable implementation of ExtendResult.

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

    • Method Detail

      • isSuccessful

        public boolean isSuccessful()
        Specified by:
        isSuccessful in interface ExtendResult
        Returns:
        The value of the isSuccessful attribute
      • withIsSuccessful

        public final ImmutableExtendResult withIsSuccessful​(boolean value)
        Copy the current immutable object by setting a value for the isSuccessful attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for isSuccessful
        Returns:
        A modified copy of the this object
      • withFinalResult

        public final ImmutableExtendResult withFinalResult​(String value)
        Copy the current immutable object by setting a present value for the optional finalResult attribute.
        Parameters:
        value - The value for finalResult
        Returns:
        A modified copy of this object
      • withFinalResult

        public final ImmutableExtendResult withFinalResult​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the finalResult 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 finalResult
        Returns:
        A modified copy of this object
      • withIntermediateResults

        public final ImmutableExtendResult withIntermediateResults​(Collection<String> value)
        Copy the current immutable object by setting a value for the intermediateResults attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for intermediateResults
        Returns:
        A modified copy of the this object
      • equals

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

        public int hashCode()
        Computes a hash code from attributes: isSuccessful, finalResult, intermediateResults.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableExtendResult copyOf​(ExtendResult instance)
        Creates an immutable copy of a ExtendResult 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 ExtendResult instance