Class ImmutableAstCommandRange

java.lang.Object
io.resys.hdes.client.api.ast.ImmutableAstCommandRange
All Implemented Interfaces:
AstBody.AstCommandRange, Serializable

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

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

See Also:
  • Method Details

    • getStart

      public int getStart()
      Specified by:
      getStart in interface AstBody.AstCommandRange
      Returns:
      The value of the start attribute
    • getEnd

      public int getEnd()
      Specified by:
      getEnd in interface AstBody.AstCommandRange
      Returns:
      The value of the end attribute
    • getColumn

      @Nullable public Integer getColumn()
      Specified by:
      getColumn in interface AstBody.AstCommandRange
      Returns:
      The value of the column attribute
    • getInsert

      @Nullable public Boolean getInsert()
      Specified by:
      getInsert in interface AstBody.AstCommandRange
      Returns:
      The value of the insert attribute
    • withStart

      public final ImmutableAstCommandRange withStart(int value)
      Copy the current immutable object by setting a value for the start attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for start
      Returns:
      A modified copy of the this object
    • withEnd

      public final ImmutableAstCommandRange withEnd(int value)
      Copy the current immutable object by setting a value for the end attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for end
      Returns:
      A modified copy of the this object
    • withColumn

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

      public final ImmutableAstCommandRange withInsert(@Nullable Boolean value)
      Copy the current immutable object by setting a value for the insert attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for insert (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 ImmutableAstCommandRange 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: start, end, column, insert.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableAstCommandRange copyOf(AstBody.AstCommandRange instance)
      Creates an immutable copy of a AstBody.AstCommandRange 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 AstCommandRange instance
    • builder

      public static ImmutableAstCommandRange.Builder builder()
      Creates a builder for ImmutableAstCommandRange.
       ImmutableAstCommandRange.builder()
          .start(int) // required start
          .end(int) // required end
          .column(Integer | null) // nullable column
          .insert(Boolean | null) // nullable insert
          .build();
       
      Returns:
      A new ImmutableAstCommandRange builder