Package io.substrait.hint
Class ImmutableRuntimeConstraint
java.lang.Object
io.substrait.hint.Hint.RuntimeConstraint
io.substrait.hint.ImmutableRuntimeConstraint
- All Implemented Interfaces:
HasExtension
Immutable implementation of
Hint.RuntimeConstraint.
Use the builder to create immutable instances:
ImmutableRuntimeConstraint.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableRuntimeConstraint. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableRuntimeConstraint.static ImmutableRuntimeConstraintcopyOf(Hint.RuntimeConstraint instance) Creates an immutable copy of aHint.RuntimeConstraintvalue.booleanThis instance is equal to all instances ofImmutableRuntimeConstraintthat have equal attribute values.inthashCode()Computes a hash code from attributes:extension.toString()Prints the immutable valueRuntimeConstraintwith attribute values.withExtension(AdvancedExtension value) Copy the current immutable object by setting a present value for the optionalextensionattribute.withExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute.
-
Method Details
-
getExtension
- Returns:
- the
AdvancedExtensionassociated directly with the class
-
withExtension
Copy the current immutable object by setting a present value for the optionalextensionattribute.- Parameters:
value- The value for extension- Returns:
- A modified copy or
thisif not changed
-
withExtension
public final ImmutableRuntimeConstraint withExtension(Optional<? extends AdvancedExtension> optional) Copy the current immutable object by setting an optional value for theextensionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for extension- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableRuntimeConstraintthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:extension. -
toString
Prints the immutable valueRuntimeConstraintwith attribute values. -
copyOf
Creates an immutable copy of aHint.RuntimeConstraintvalue. 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 RuntimeConstraint instance
-
builder
Creates a builder forImmutableRuntimeConstraint.ImmutableRuntimeConstraint.builder() .extension(Optional<io.substrait.extension.AdvancedExtension>) // optionalextension.build();- Returns:
- A new ImmutableRuntimeConstraint builder
-