Class ImmutableFlowProgram

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableFlowProgram
All Implemented Interfaces:
FlowProgram, Program, Serializable

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

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

See Also:
  • Method Details

    • getAcceptDefs

      public Collection<TypeDef> getAcceptDefs()
      Specified by:
      getAcceptDefs in interface FlowProgram
      Returns:
      The value of the acceptDefs attribute
    • getStartStepId

      public String getStartStepId()
      Specified by:
      getStartStepId in interface FlowProgram
      Returns:
      The value of the startStepId attribute
    • getSteps

      public com.google.common.collect.ImmutableMap<String,FlowProgram.FlowProgramStep> getSteps()
      Specified by:
      getSteps in interface FlowProgram
      Returns:
      The value of the steps attribute
    • withAcceptDefs

      public final ImmutableFlowProgram withAcceptDefs(Collection<TypeDef> value)
      Copy the current immutable object by setting a value for the acceptDefs attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for acceptDefs
      Returns:
      A modified copy of the this object
    • withStartStepId

      public final ImmutableFlowProgram withStartStepId(String value)
      Copy the current immutable object by setting a value for the startStepId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for startStepId
      Returns:
      A modified copy of the this object
    • withSteps

      public final ImmutableFlowProgram withSteps(Map<String,? extends FlowProgram.FlowProgramStep> entries)
      Copy the current immutable object by replacing the steps map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the steps map
      Returns:
      A modified copy of this object
    • equals

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

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

      public static ImmutableFlowProgram copyOf(FlowProgram instance)
      Creates an immutable copy of a FlowProgram 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 FlowProgram instance
    • builder

      public static ImmutableFlowProgram.Builder builder()
      Creates a builder for ImmutableFlowProgram.
       ImmutableFlowProgram.builder()
          .acceptDefs(Collection&lt;io.resys.hdes.client.api.ast.TypeDef&gt;) // required acceptDefs
          .startStepId(String) // required startStepId
          .putSteps|putAllSteps(String => io.resys.hdes.client.api.programs.FlowProgram.FlowProgramStep) // steps mappings
          .build();
       
      Returns:
      A new ImmutableFlowProgram builder