Class ImmutableExpression.EmptyMapLiteral

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

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

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

  • Method Details

    • nullable

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

      public Type keyType()
      Specified by:
      keyType in class Expression.EmptyMapLiteral
      Returns:
      The value of the keyType attribute
    • valueType

      public Type valueType()
      Specified by:
      valueType in class Expression.EmptyMapLiteral
      Returns:
      The value of the valueType attribute
    • withNullable

      public final ImmutableExpression.EmptyMapLiteral 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
    • withKeyType

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

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

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

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

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

      Creates a builder for EmptyMapLiteral.
       ImmutableExpression.EmptyMapLiteral.builder()
          .nullable(boolean) // optional nullable
          .keyType(io.substrait.type.Type) // required keyType
          .valueType(io.substrait.type.Type) // required valueType
          .build();
       
      Returns:
      A new EmptyMapLiteral builder