Class ImmutableExpression.UserDefinedAnyLiteral

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

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

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

  • Method Details

    • nullable

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

      public String urn()
      Specified by:
      urn in interface Expression.UserDefinedLiteral
      Specified by:
      urn in class Expression.UserDefinedAnyLiteral
      Returns:
      The value of the urn attribute
    • name

      public String name()
      Specified by:
      name in interface Expression.UserDefinedLiteral
      Specified by:
      name in class Expression.UserDefinedAnyLiteral
      Returns:
      The value of the name attribute
    • typeParameters

      public List<Type.Parameter> typeParameters()
      Specified by:
      typeParameters in interface Expression.UserDefinedLiteral
      Specified by:
      typeParameters in class Expression.UserDefinedAnyLiteral
      Returns:
      The value of the typeParameters attribute
    • value

      public com.google.protobuf.Any value()
      Specified by:
      value in class Expression.UserDefinedAnyLiteral
      Returns:
      The value of the value attribute
    • withNullable

      public final ImmutableExpression.UserDefinedAnyLiteral 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
    • withUrn

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

      public final ImmutableExpression.UserDefinedAnyLiteral 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
    • withTypeParameters

      public final ImmutableExpression.UserDefinedAnyLiteral withTypeParameters(Type.Parameter... elements)
      Copy the current immutable object with elements that replace the content of typeParameters.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withTypeParameters

      public final ImmutableExpression.UserDefinedAnyLiteral withTypeParameters(Iterable<? extends Type.Parameter> elements)
      Copy the current immutable object with elements that replace the content of typeParameters. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of typeParameters elements to set
      Returns:
      A modified copy or this if not changed
    • withValue

      public final ImmutableExpression.UserDefinedAnyLiteral withValue(com.google.protobuf.Any value)
      Copy the current immutable object by setting a value for the value attribute. A shallow reference 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 UserDefinedAnyLiteral 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, urn, name, typeParameters, value.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      Creates a builder for UserDefinedAnyLiteral.
       ImmutableExpression.UserDefinedAnyLiteral.builder()
          .nullable(boolean) // optional nullable
          .urn(String) // required urn
          .name(String) // required name
          .addTypeParameters|addAllTypeParameters(io.substrait.type.Type.Parameter) // typeParameters elements
          .value(com.google.protobuf.Any) // required value
          .build();
       
      Returns:
      A new UserDefinedAnyLiteral builder