Package io.substrait.expression
Class ImmutableFunctionOption
java.lang.Object
io.substrait.expression.FunctionOption
io.substrait.expression.ImmutableFunctionOption
Immutable implementation of
FunctionOption.
Use the builder to create immutable instances:
ImmutableFunctionOption.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableFunctionOption. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableFunctionOption.static ImmutableFunctionOptioncopyOf(FunctionOption instance) Creates an immutable copy of aFunctionOptionvalue.booleanThis instance is equal to all instances ofImmutableFunctionOptionthat have equal attribute values.getName()inthashCode()Computes a hash code from attributes:name,values.toString()Prints the immutable valueFunctionOptionwith attribute values.values()final ImmutableFunctionOptionCopy the current immutable object by setting a value for thenameattribute.final ImmutableFunctionOptionwithValues(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofvalues.final ImmutableFunctionOptionwithValues(String... elements) Copy the current immutable object with elements that replace the content ofvalues.
-
Method Details
-
getName
- Specified by:
getNamein classFunctionOption- Returns:
- The value of the
nameattribute
-
values
- Specified by:
valuesin classFunctionOption- Returns:
- The value of the
valuesattribute
-
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
-
withValues
Copy the current immutable object with elements that replace the content ofvalues.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withValues
Copy the current immutable object with elements that replace the content ofvalues. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of values elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableFunctionOptionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,values. -
toString
Prints the immutable valueFunctionOptionwith attribute values. -
copyOf
Creates an immutable copy of aFunctionOptionvalue. 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 FunctionOption instance
-
builder
Creates a builder forImmutableFunctionOption.ImmutableFunctionOption.builder() .name(String) // requiredname.addValues|addAllValues(String) //valueselements .build();- Returns:
- A new ImmutableFunctionOption builder
-