Class ImmutableAstTagValue

java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstTagValue
All Implemented Interfaces:
AstTag.AstTagValue

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

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

  • Method Details

    • getId

      @Nullable public String getId()
      Specified by:
      getId in interface AstTag.AstTagValue
      Returns:
      The value of the id attribute
    • getHash

      public String getHash()
      Specified by:
      getHash in interface AstTag.AstTagValue
      Returns:
      The value of the hash attribute
    • getBodyType

      public AstBody.AstBodyType getBodyType()
      Specified by:
      getBodyType in interface AstTag.AstTagValue
      Returns:
      The value of the bodyType attribute
    • getCommands

      public com.google.common.collect.ImmutableList<AstCommand> getCommands()
      Specified by:
      getCommands in interface AstTag.AstTagValue
      Returns:
      The value of the commands attribute
    • withId

      public final ImmutableAstTagValue withId(@Nullable String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id (can be null)
      Returns:
      A modified copy of the this object
    • withHash

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

      public final ImmutableAstTagValue withBodyType(AstBody.AstBodyType value)
      Copy the current immutable object by setting a value for the bodyType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for bodyType
      Returns:
      A modified copy of the this object
    • withCommands

      public final ImmutableAstTagValue withCommands(AstCommand... elements)
      Copy the current immutable object with elements that replace the content of commands.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCommands

      public final ImmutableAstTagValue withCommands(Iterable<? extends AstCommand> elements)
      Copy the current immutable object with elements that replace the content of commands. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of commands elements to set
      Returns:
      A modified copy of this object
    • equals

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

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

      public static ImmutableAstTagValue copyOf(AstTag.AstTagValue instance)
      Creates an immutable copy of a AstTag.AstTagValue 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 AstTagValue instance
    • builder

      public static ImmutableAstTagValue.Builder builder()
      Creates a builder for ImmutableAstTagValue.
       ImmutableAstTagValue.builder()
          .id(String | null) // nullable id
          .hash(String) // required hash
          .bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // required bodyType
          .addCommands|addAllCommands(io.resys.hdes.client.api.ast.AstCommand) // commands elements
          .build();
       
      Returns:
      A new ImmutableAstTagValue builder