Class ImmutableExpression.NullLiteral

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

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

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

  • Method Details

    • type

      public Type type()
      Specified by:
      type in class Expression.NullLiteral
      Returns:
      The value of the type attribute
    • withType

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

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

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

      Creates an immutable copy of a Expression.NullLiteral 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 NullLiteral instance
    • builder

      public static ImmutableExpression.NullLiteral.Builder builder()
      Creates a builder for NullLiteral.
       ImmutableExpression.NullLiteral.builder()
          .type(io.substrait.type.Type) // required type
          .build();
       
      Returns:
      A new NullLiteral builder