Package io.substrait.function
Class ImmutableTypeExpression.Func
java.lang.Object
io.substrait.function.TypeExpression.BaseTypeExpression
io.substrait.function.TypeExpression.Func
io.substrait.function.ImmutableTypeExpression.Func
- All Implemented Interfaces:
NullableType,TypeExpression
- Enclosing class:
- ImmutableTypeExpression
Immutable implementation of
TypeExpression.Func.
Use the builder to create immutable instances:
ImmutableTypeExpression.Func.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.function.TypeExpression
TypeExpression.BaseTypeExpression, TypeExpression.BinaryOperation, TypeExpression.Decimal, TypeExpression.FixedBinary, TypeExpression.FixedChar, TypeExpression.Func, TypeExpression.IfOperation, TypeExpression.IntegerLiteral, TypeExpression.IntervalCompound, TypeExpression.IntervalDay, TypeExpression.ListType, TypeExpression.Map, TypeExpression.NotOperation, TypeExpression.PrecisionTime, TypeExpression.PrecisionTimestamp, TypeExpression.PrecisionTimestampTZ, TypeExpression.RequiredTypeExpressionVisitorException, TypeExpression.ReturnProgram, TypeExpression.Struct, TypeExpression.VarChar -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forFunc.static ImmutableTypeExpression.FunccopyOf(TypeExpression.Func instance) Creates an immutable copy of aTypeExpression.Funcvalue.booleanThis instance is equal to all instances ofFuncthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,parameterTypes,returnType.booleannullable()toString()Prints the immutable valueFuncwith attribute values.withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.withParameterTypes(TypeExpression... elements) Copy the current immutable object with elements that replace the content ofparameterTypes.withParameterTypes(Iterable<? extends TypeExpression> elements) Copy the current immutable object with elements that replace the content ofparameterTypes.withReturnType(TypeExpression value) Copy the current immutable object by setting a value for thereturnTypeattribute.Methods inherited from class io.substrait.function.TypeExpression.BaseTypeExpression
accept
-
Method Details
-
nullable
public boolean nullable()- Returns:
- The value of the
nullableattribute
-
parameterTypes
- Specified by:
parameterTypesin classTypeExpression.Func- Returns:
- The value of the
parameterTypesattribute
-
returnType
- Specified by:
returnTypein classTypeExpression.Func- Returns:
- The value of the
returnTypeattribute
-
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
-
withParameterTypes
Copy the current immutable object with elements that replace the content ofparameterTypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withParameterTypes
public final ImmutableTypeExpression.Func withParameterTypes(Iterable<? extends TypeExpression> elements) Copy the current immutable object with elements that replace the content ofparameterTypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of parameterTypes elements to set- Returns:
- A modified copy or
thisif not changed
-
withReturnType
Copy the current immutable object by setting a value for thereturnTypeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for returnType- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofFuncthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,parameterTypes,returnType. -
toString
Prints the immutable valueFuncwith attribute values. -
copyOf
Creates an immutable copy of aTypeExpression.Funcvalue. 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 Func instance
-
builder
Creates a builder forFunc.ImmutableTypeExpression.Func.builder() .nullable(boolean) // requirednullable.addParameterTypes|addAllParameterTypes(io.substrait.function.TypeExpression) //parameterTypeselements .returnType(io.substrait.function.TypeExpression) // requiredreturnType.build();- Returns:
- A new Func builder
-