Record Class NestedPlan<C>
java.lang.Object
java.lang.Record
dev.engine_room.flywheel.lib.task.NestedPlan<C>
- All Implemented Interfaces:
Plan<C>,SimplyComposedPlan<C>
public record NestedPlan<C>(List<Plan<C>> parallelPlans)
extends Record
implements SimplyComposedPlan<C>
-
Constructor Summary
ConstructorsConstructorDescriptionNestedPlan(List<Plan<C>> parallelPlans) Creates an instance of aNestedPlanrecord class. -
Method Summary
Modifier and TypeMethodDescriptionCreate a new plan that executes this plan and the given plan in parallel.final booleanIndicates whether some other object is "equal to" this one.voidexecute(TaskExecutor taskExecutor, C context, Runnable onCompletion) Submit this plan for execution.final inthashCode()Returns a hash code value for this object.static <C> NestedPlan<C> Returns the value of theparallelPlansrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.engine_room.flywheel.lib.task.SimplyComposedPlan
then
-
Constructor Details
-
NestedPlan
Creates an instance of aNestedPlanrecord class.- Parameters:
parallelPlans- the value for theparallelPlansrecord component
-
-
Method Details
-
of
-
execute
Description copied from interface:PlanSubmit this plan for execution.You must call
onCompletion.run()when the plan has completed execution. -
and
Description copied from interface:PlanCreate a new plan that executes this plan and the given plan in parallel. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
parallelPlans
Returns the value of theparallelPlansrecord component.- Returns:
- the value of the
parallelPlansrecord component
-