Package io.substrait.extension
Class ImmutableSimpleExtension.VariadicBehavior
java.lang.Object
io.substrait.extension.ImmutableSimpleExtension.VariadicBehavior
- All Implemented Interfaces:
SimpleExtension.VariadicBehavior
- Enclosing class:
- ImmutableSimpleExtension
public static final class ImmutableSimpleExtension.VariadicBehavior
extends Object
implements SimpleExtension.VariadicBehavior
Immutable implementation of
SimpleExtension.VariadicBehavior.
Use the builder to create immutable instances:
ImmutableSimpleExtension.VariadicBehavior.builder().
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface io.substrait.extension.SimpleExtension.VariadicBehavior
SimpleExtension.VariadicBehavior.ParameterConsistency -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forVariadicBehavior.copyOf(SimpleExtension.VariadicBehavior instance) Creates an immutable copy of aSimpleExtension.VariadicBehaviorvalue.booleanThis instance is equal to all instances ofVariadicBehaviorthat have equal attribute values.getMax()intgetMin()inthashCode()Computes a hash code from attributes:min,max,parameterConsistency.toString()Prints the immutable valueVariadicBehaviorwith attribute values.withMax(int value) Copy the current immutable object by setting a present value for the optionalmaxattribute.withMax(OptionalInt optional) Copy the current immutable object by setting an optional value for themaxattribute.withMin(int value) Copy the current immutable object by setting a value for theminattribute.Copy the current immutable object by setting a value for theparameterConsistencyattribute.
-
Method Details
-
getMin
public int getMin()- Specified by:
getMinin interfaceSimpleExtension.VariadicBehavior- Returns:
- The value of the
minattribute
-
getMax
- Specified by:
getMaxin interfaceSimpleExtension.VariadicBehavior- Returns:
- The value of the
maxattribute
-
parameterConsistency
- Specified by:
parameterConsistencyin interfaceSimpleExtension.VariadicBehavior- Returns:
- The value of the
parameterConsistencyattribute
-
withMin
Copy the current immutable object by setting a value for theminattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for min- Returns:
- A modified copy or the
thisobject
-
withMax
Copy the current immutable object by setting a present value for the optionalmaxattribute.- Parameters:
value- The value for max- Returns:
- A modified copy or
thisif not changed
-
withMax
Copy the current immutable object by setting an optional value for themaxattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for max- Returns:
- A modified copy or
thisif not changed
-
withParameterConsistency
public final ImmutableSimpleExtension.VariadicBehavior withParameterConsistency(SimpleExtension.VariadicBehavior.ParameterConsistency value) Copy the current immutable object by setting a value for theparameterConsistencyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parameterConsistency- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofVariadicBehaviorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:min,max,parameterConsistency. -
toString
Prints the immutable valueVariadicBehaviorwith attribute values. -
copyOf
public static ImmutableSimpleExtension.VariadicBehavior copyOf(SimpleExtension.VariadicBehavior instance) Creates an immutable copy of aSimpleExtension.VariadicBehaviorvalue. 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 VariadicBehavior instance
-
builder
Creates a builder forVariadicBehavior.ImmutableSimpleExtension.VariadicBehavior.builder() .min(int) // requiredmin.max(OptionalInt) // optionalmax.parameterConsistency(io.substrait.extension.SimpleExtension.VariadicBehavior.ParameterConsistency) // optionalparameterConsistency.build();- Returns:
- A new VariadicBehavior builder
-