Module xyz.ronella.casual.trivial
Package xyz.ronella.trivial.handy
Class LogicMapper.LogicMapperBuilder<TYPE_OUTPUT>
java.lang.Object
xyz.ronella.trivial.handy.LogicMapper.LogicMapperBuilder<TYPE_OUTPUT>
- Enclosing class:
- LogicMapper<TYPE_OUTPUT>
A class that can build an instance of LogicMapper.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance that can build a LogicMapper instance. -
Method Summary
Modifier and TypeMethodDescriptionaddFinalLogic(Supplier<TYPE_OUTPUT> logic) The very last logic to execute after the last addLogic execution.addInitialLogic(Sink logic) The very first logic to execute before the first addLogic execution.addInlineLogic(Sink logic) Add a logic that will definitely added.addLogic(BooleanSupplier condition, Sink logic) Add a logic to the collection.build()Builds an instance of LogicMapper.
-
Constructor Details
-
LogicMapperBuilder
public LogicMapperBuilder()Creates an instance that can build a LogicMapper instance.
-
-
Method Details
-
addLogic
Add a logic to the collection.- Parameters:
condition- A Boolean Supplier.logic- The logic to be executed if the condition is evaluated to true.- Returns:
- The builder instance.
-
addInlineLogic
Add a logic that will definitely added.- Parameters:
logic- The logic to be executed.- Returns:
- The builder instance.
- Since:
- 2.0.0
-
addInitialLogic
The very first logic to execute before the first addLogic execution.- Parameters:
logic- The very first logic.- Returns:
- The builder instance
- Since:
- 1.3.0
-
addFinalLogic
The very last logic to execute after the last addLogic execution.- Parameters:
logic- The very first logic.- Returns:
- The builder instance
- Since:
- 1.3.0
-
build
Builds an instance of LogicMapper.- Returns:
- An instance of LogicMapper.
-