Class ImmutableServiceResult

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableServiceResult
All Implemented Interfaces:
Program.ProgramResult, ServiceProgram.ServiceResult, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableServiceResult extends Object implements ServiceProgram.ServiceResult
Immutable implementation of ServiceProgram.ServiceResult.

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

See Also:
  • Method Details

    • getValue

      public Serializable getValue()
      Specified by:
      getValue in interface ServiceProgram.ServiceResult
      Returns:
      The value of the value attribute
    • withValue

      public final ImmutableServiceResult withValue(Serializable value)
      Copy the current immutable object by setting a value for the value attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for value
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableServiceResult 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: value.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableServiceResult copyOf(ServiceProgram.ServiceResult instance)
      Creates an immutable copy of a ServiceProgram.ServiceResult 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 ServiceResult instance
    • builder

      public static ImmutableServiceResult.Builder builder()
      Creates a builder for ImmutableServiceResult.
       ImmutableServiceResult.builder()
          .value(java.io.Serializable) // required value
          .build();
       
      Returns:
      A new ImmutableServiceResult builder