Package io.substrait.expression
Class ImmutableEnumArg
java.lang.Object
io.substrait.expression.ImmutableEnumArg
- All Implemented Interfaces:
EnumArg,FunctionArg
Immutable implementation of
EnumArg.
Use the builder to create immutable instances:
ImmutableEnumArg.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.expression.FunctionArg
FunctionArg.FuncArgVisitor<R,C extends VisitationContext, E extends Throwable>, FunctionArg.ProtoFrom -
Field Summary
Fields inherited from interface io.substrait.expression.EnumArg
UNSPECIFIED_ENUM_ARG -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableEnumArg.Builderbuilder()Creates a builder forImmutableEnumArg.static ImmutableEnumArgCreates an immutable copy of aEnumArgvalue.booleanThis instance is equal to all instances ofImmutableEnumArgthat have equal attribute values.inthashCode()Computes a hash code from attributes:value.toString()Prints the immutable valueEnumArgwith attribute values.value()final ImmutableEnumArgCopy the current immutable object by setting a present value for the optionalvalueattribute.final ImmutableEnumArgCopy the current immutable object by setting an optional value for thevalueattribute.
-
Method Details
-
value
-
withValue
Copy the current immutable object by setting a present value for the optionalvalueattribute.- Parameters:
value- The value for value- Returns:
- A modified copy or
thisif not changed
-
withValue
Copy the current immutable object by setting an optional value for thevalueattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for value- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableEnumArgthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:value. -
toString
Prints the immutable valueEnumArgwith attribute values. -
copyOf
Creates an immutable copy of aEnumArgvalue. 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 EnumArg instance
-
builder
Creates a builder forImmutableEnumArg.ImmutableEnumArg.builder() .value(Optional<String>) // optionalvalue.build();- Returns:
- A new ImmutableEnumArg builder
-