Class IterativeFunction.PrePostBuilder<O,P>
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.IterativeFunction.PrePostBuilder<O,P>
- Type Parameters:
O
- The current output of the pre-propagator list.P
- The current output of the post-propagator list.
- Enclosing class:
IterativeFunction
A builder for iterative smart functions.
The idea is that this builder will buildReader two lists, one for the value propagators before
the core propagator, and one for the value propagators after the core propagators.
This is so that the pre- and post- list can be shared and only the core propagators
is variable.
-
Method Summary
Modifier and TypeMethodDescription<P2> IterativeFunction.PrePostBuilder
<O, P2> appendPost
(IOperatorValuePropagator<P2, P> valuePropagator) Add a new post-propagator<O2> IterativeFunction.PrePostBuilder
<O2, P> appendPre
(IOperatorValuePropagator<O, O2> valuePropagator) Add a new pre-propagatorbegin()
build
(IOperatorValuePropagator<O, P> valuePropagator) Finalize the function with the given core propagator.
-
Method Details
-
begin
- Returns:
- The builder instance.
-
appendPre
public <O2> IterativeFunction.PrePostBuilder<O2,P> appendPre(IOperatorValuePropagator<O, O2> valuePropagator) Add a new pre-propagator- Type Parameters:
O2
- The new output of the pre-propagator list.- Parameters:
valuePropagator
- The pre-propagator- Returns:
- The builder instance.
-
appendPost
public <P2> IterativeFunction.PrePostBuilder<O,P2> appendPost(IOperatorValuePropagator<P2, P> valuePropagator) Add a new post-propagator- Type Parameters:
P2
- The new output of the post-propagator list.- Parameters:
valuePropagator
- The post-propagator- Returns:
- The builder instance.
-
build
Finalize the function with the given core propagator.- Parameters:
valuePropagator
- The core propagator that will be connected to the pre- and post-list.- Returns:
- The built function.
-