Package io.substrait.hint
Class ImmutableSavedComputation
java.lang.Object
io.substrait.hint.Hint.SavedComputation
io.substrait.hint.ImmutableSavedComputation
Immutable implementation of
Hint.SavedComputation.
Use the builder to create immutable instances:
ImmutableSavedComputation.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableSavedComputation. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableSavedComputation.intstatic ImmutableSavedComputationcopyOf(Hint.SavedComputation instance) Creates an immutable copy of aHint.SavedComputationvalue.booleanThis instance is equal to all instances ofImmutableSavedComputationthat have equal attribute values.inthashCode()Computes a hash code from attributes:computationId,computationType.toString()Prints the immutable valueSavedComputationwith attribute values.withComputationId(int value) Copy the current immutable object by setting a value for thecomputationIdattribute.Copy the current immutable object by setting a value for thecomputationTypeattribute.
-
Method Details
-
computationId
public int computationId()- Specified by:
computationIdin classHint.SavedComputation- Returns:
- The value of the
computationIdattribute
-
computationType
- Specified by:
computationTypein classHint.SavedComputation- Returns:
- The value of the
computationTypeattribute
-
withComputationId
Copy the current immutable object by setting a value for thecomputationIdattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for computationId- Returns:
- A modified copy or the
thisobject
-
withComputationType
Copy the current immutable object by setting a value for thecomputationTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for computationType- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableSavedComputationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:computationId,computationType. -
toString
Prints the immutable valueSavedComputationwith attribute values. -
copyOf
Creates an immutable copy of aHint.SavedComputationvalue. 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 SavedComputation instance
-
builder
Creates a builder forImmutableSavedComputation.ImmutableSavedComputation.builder() .computationId(int) // requiredcomputationId.computationType(io.substrait.hint.Hint.ComputationType) // requiredcomputationType.build();- Returns:
- A new ImmutableSavedComputation builder
-