Class ImmutableTypeExpression.Assignment

java.lang.Object
io.substrait.function.TypeExpression.ReturnProgram.Assignment
io.substrait.function.ImmutableTypeExpression.Assignment
Enclosing class:
ImmutableTypeExpression

public static final class ImmutableTypeExpression.Assignment extends TypeExpression.ReturnProgram.Assignment
Immutable implementation of TypeExpression.ReturnProgram.Assignment.

Use the builder to create immutable instances: ImmutableTypeExpression.Assignment.builder().

  • Method Details

    • name

      public String name()
      Specified by:
      name in class TypeExpression.ReturnProgram.Assignment
      Returns:
      The value of the name attribute
    • expr

      public TypeExpression expr()
      Specified by:
      expr in class TypeExpression.ReturnProgram.Assignment
      Returns:
      The value of the expr attribute
    • withName

      public final ImmutableTypeExpression.Assignment withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy or the this object
    • withExpr

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

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

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

      Creates an immutable copy of a TypeExpression.ReturnProgram.Assignment 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 Assignment instance
    • builder

      Creates a builder for Assignment.
       ImmutableTypeExpression.Assignment.builder()
          .name(String) // required name
          .expr(io.substrait.function.TypeExpression) // required expr
          .build();
       
      Returns:
      A new Assignment builder