Class ImmutableExpression.I32Literal

java.lang.Object
io.substrait.expression.Expression.I32Literal
io.substrait.expression.ImmutableExpression.I32Literal
All Implemented Interfaces:
Expression, Expression.Literal, FunctionArg
Enclosing class:
ImmutableExpression

public static final class ImmutableExpression.I32Literal extends Expression.I32Literal
Immutable implementation of Expression.I32Literal.

Use the builder to create immutable instances: ImmutableExpression.I32Literal.builder().

  • Method Details

    • nullable

      public boolean nullable()
      Returns:
      The value of the nullable attribute
    • value

      public int value()
      Specified by:
      value in class Expression.I32Literal
      Returns:
      The value of the value attribute
    • withNullable

      public final ImmutableExpression.I32Literal withNullable(boolean value)
      Copy the current immutable object by setting a value for the nullable attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for nullable
      Returns:
      A modified copy or the this object
    • withValue

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

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

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

      public static ImmutableExpression.I32Literal copyOf(Expression.I32Literal instance)
      Creates an immutable copy of a Expression.I32Literal 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 I32Literal instance
    • builder

      public static ImmutableExpression.I32Literal.Builder builder()
      Creates a builder for I32Literal.
       ImmutableExpression.I32Literal.builder()
          .nullable(boolean) // optional nullable
          .value(int) // required value
          .build();
       
      Returns:
      A new I32Literal builder