Class ImmutableProgramContextNamedValue

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableProgramContextNamedValue
All Implemented Interfaces:
Program.ProgramContextNamedValue

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableProgramContextNamedValue extends Object implements Program.ProgramContextNamedValue
Immutable implementation of Program.ProgramContextNamedValue.

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

  • Method Details

    • getFound

      public Boolean getFound()
      Specified by:
      getFound in interface Program.ProgramContextNamedValue
      Returns:
      The value of the found attribute
    • getValue

      @Nullable public Serializable getValue()
      Specified by:
      getValue in interface Program.ProgramContextNamedValue
      Returns:
      The value of the value attribute
    • withFound

      public final ImmutableProgramContextNamedValue withFound(Boolean value)
      Copy the current immutable object by setting a value for the found attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for found
      Returns:
      A modified copy of the this object
    • withValue

      public final ImmutableProgramContextNamedValue withValue(@Nullable 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 (can be null)
      Returns:
      A modified copy of the this object
    • equals

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

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

      Creates an immutable copy of a Program.ProgramContextNamedValue 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 ProgramContextNamedValue instance
    • builder

      Creates a builder for ImmutableProgramContextNamedValue.
       ImmutableProgramContextNamedValue.builder()
          .found(Boolean) // required found
          .value(java.io.Serializable | null) // nullable value
          .build();
       
      Returns:
      A new ImmutableProgramContextNamedValue builder