Package io.substrait.function
Class ImmutableParameterizedType.StringLiteral
java.lang.Object
io.substrait.function.ParameterizedType.BaseParameterizedType
io.substrait.function.ParameterizedType.StringLiteral
io.substrait.function.ImmutableParameterizedType.StringLiteral
- All Implemented Interfaces:
NullableType,ParameterizedType,TypeExpression
- Enclosing class:
- ImmutableParameterizedType
public static final class ImmutableParameterizedType.StringLiteral
extends ParameterizedType.StringLiteral
Immutable implementation of
ParameterizedType.StringLiteral.
Use the builder to create immutable instances:
ImmutableParameterizedType.StringLiteral.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.function.ParameterizedType
ParameterizedType.BaseParameterizedType, ParameterizedType.Decimal, ParameterizedType.FixedBinary, ParameterizedType.FixedChar, ParameterizedType.Func, ParameterizedType.IntervalCompound, ParameterizedType.IntervalDay, ParameterizedType.ListType, ParameterizedType.Map, ParameterizedType.NullableParameterizedType, ParameterizedType.PrecisionTime, ParameterizedType.PrecisionTimestamp, ParameterizedType.PrecisionTimestampTZ, ParameterizedType.RequiredParameterizedVisitorException, ParameterizedType.StringLiteral, ParameterizedType.Struct, ParameterizedType.VarCharNested classes/interfaces inherited from interface io.substrait.function.TypeExpression
TypeExpression.BaseTypeExpression, TypeExpression.BinaryOperation, TypeExpression.IfOperation, TypeExpression.IntegerLiteral, TypeExpression.NotOperation, TypeExpression.RequiredTypeExpressionVisitorException, TypeExpression.ReturnProgram -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forStringLiteral.copyOf(ParameterizedType.StringLiteral instance) Creates an immutable copy of aParameterizedType.StringLiteralvalue.booleanThis instance is equal to all instances ofStringLiteralthat have equal attribute values.inthashCode()Computes a hash code from attributes:nullable,value.booleannullable()toString()Prints the immutable valueStringLiteralwith attribute values.value()withNullable(boolean value) Copy the current immutable object by setting a value for thenullableattribute.Copy the current immutable object by setting a value for thevalueattribute.Methods inherited from class io.substrait.function.ParameterizedType.StringLiteral
isWildcardMethods inherited from class io.substrait.function.ParameterizedType.BaseParameterizedType
accept
-
Method Details
-
nullable
public boolean nullable()- Returns:
- The value of the
nullableattribute
-
value
- Specified by:
valuein classParameterizedType.StringLiteral- 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
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check 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 ofStringLiteralthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:nullable,value. -
toString
Prints the immutable valueStringLiteralwith attribute values. -
copyOf
public static ImmutableParameterizedType.StringLiteral copyOf(ParameterizedType.StringLiteral instance) Creates an immutable copy of aParameterizedType.StringLiteralvalue. 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 StringLiteral instance
-
builder
Creates a builder forStringLiteral.ImmutableParameterizedType.StringLiteral.builder() .nullable(boolean) // requirednullable.value(String) // requiredvalue.build();- Returns:
- A new StringLiteral builder
-