Package io.substrait.expression
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().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeUserDefinedAnyLiteral.Nested classes/interfaces inherited from interface io.substrait.expression.Expression
Expression.AggregationInvocation, Expression.AggregationPhase, Expression.BinaryLiteral, Expression.BoolLiteral, Expression.Cast, Expression.DateLiteral, Expression.DecimalLiteral, Expression.EmptyListLiteral, Expression.EmptyMapLiteral, Expression.FailureBehavior, Expression.FixedBinaryLiteral, Expression.FixedCharLiteral, Expression.FP32Literal, Expression.FP64Literal, Expression.I16Literal, Expression.I32Literal, Expression.I64Literal, Expression.I8Literal, Expression.IfClause, Expression.IfThen, Expression.InPredicate, Expression.IntervalCompoundLiteral, Expression.IntervalDayLiteral, Expression.IntervalYearLiteral, Expression.Lambda, Expression.ListLiteral, Expression.Literal, Expression.MapLiteral, Expression.MultiOrList, Expression.MultiOrListRecord, Expression.Nested, Expression.NestedList, Expression.NestedStruct, Expression.NullLiteral, Expression.PrecisionTimeLiteral, Expression.PrecisionTimestampLiteral, Expression.PrecisionTimestampTZLiteral, Expression.PredicateOp, Expression.ScalarFunctionInvocation, Expression.ScalarSubquery, Expression.SetPredicate, Expression.SingleOrList, Expression.SortDirection, Expression.SortField, Expression.StrLiteral, Expression.StructLiteral, Expression.Subquery, Expression.Switch, Expression.SwitchClause, Expression.TimeLiteral, Expression.TimestampLiteral, Expression.TimestampTZLiteral, Expression.UserDefinedAnyLiteral, Expression.UserDefinedLiteral, Expression.UserDefinedStructLiteral, Expression.UUIDLiteral, Expression.VarCharLiteral, Expression.WindowBoundsType, Expression.WindowFunctionInvocationNested classes/interfaces inherited from interface io.substrait.expression.FunctionArg
FunctionArg.FuncArgVisitor<R,C extends VisitationContext, E extends Throwable>, FunctionArg.ProtoFrom -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forUserDefinedAnyLiteral.copyOf(Expression.UserDefinedAnyLiteral instance) Creates an immutable copy of aExpression.UserDefinedAnyLiteralvalue.booleanThis instance is equal to all instances ofUserDefinedAnyLiteralthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,urn,name,typeParameters,value.name()booleannullable()toString()Prints the immutable valueUserDefinedAnyLiteralwith attribute values.urn()com.google.protobuf.Anyvalue()Copy the current immutable object by setting a value for thenameattribute.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.withTypeParameters(Type.Parameter... elements) Copy the current immutable object with elements that replace the content oftypeParameters.withTypeParameters(Iterable<? extends Type.Parameter> elements) Copy the current immutable object with elements that replace the content oftypeParameters.Copy the current immutable object by setting a value for theurnattribute.withValue(com.google.protobuf.Any value) Copy the current immutable object by setting a value for thevalueattribute.Methods inherited from class io.substrait.expression.Expression.UserDefinedAnyLiteral
accept, getTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.substrait.expression.Expression
accept
-
Method Details
-
nullable
public boolean nullable()- Returns:
- The value of the
nullableattribute
-
urn
- Specified by:
urnin interfaceExpression.UserDefinedLiteral- Specified by:
urnin classExpression.UserDefinedAnyLiteral- Returns:
- The value of the
urnattribute
-
name
- Specified by:
namein interfaceExpression.UserDefinedLiteral- Specified by:
namein classExpression.UserDefinedAnyLiteral- Returns:
- The value of the
nameattribute
-
typeParameters
- Specified by:
typeParametersin interfaceExpression.UserDefinedLiteral- Specified by:
typeParametersin classExpression.UserDefinedAnyLiteral- Returns:
- The value of the
typeParametersattribute
-
value
public com.google.protobuf.Any value()- Specified by:
valuein classExpression.UserDefinedAnyLiteral- Returns:
- The value of the
valueattribute
-
withNullable
Copy the current immutable object by setting a value for thenullableattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for nullable- Returns:
- A modified copy or the
thisobject
-
withUrn
Copy the current immutable object by setting a value for theurnattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for urn- Returns:
- A modified copy or the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withTypeParameters
public final ImmutableExpression.UserDefinedAnyLiteral withTypeParameters(Type.Parameter... elements) Copy the current immutable object with elements that replace the content oftypeParameters.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTypeParameters
public final ImmutableExpression.UserDefinedAnyLiteral withTypeParameters(Iterable<? extends Type.Parameter> elements) Copy the current immutable object with elements that replace the content oftypeParameters. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of typeParameters elements to set- Returns:
- A modified copy or
thisif not changed
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofUserDefinedAnyLiteralthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,urn,name,typeParameters,value. -
toString
Prints the immutable valueUserDefinedAnyLiteralwith attribute values. -
copyOf
public static ImmutableExpression.UserDefinedAnyLiteral copyOf(Expression.UserDefinedAnyLiteral instance) Creates an immutable copy of aExpression.UserDefinedAnyLiteralvalue. 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 forUserDefinedAnyLiteral.ImmutableExpression.UserDefinedAnyLiteral.builder() .nullable(boolean) // optionalnullable.urn(String) // requiredurn.name(String) // requiredname.addTypeParameters|addAllTypeParameters(io.substrait.type.Type.Parameter) //typeParameterselements .value(com.google.protobuf.Any) // requiredvalue.build();- Returns:
- A new UserDefinedAnyLiteral builder
-