-
- All Implemented Interfaces:
public final class CommandQueueBuilder<P extends Position2D<out P>>Builder class that eases the building of a queue of DrawCommands.
-
-
Method Summary
Modifier and Type Method Description CommandQueueBuilderwrapAndAdd(Supplier<Boolean> supplier, DrawCommand<P> doOnJFXThread)Wraps a DrawCommandaround to the queue to be executed on the JavaFX thread.CommandQueueBuilderaddCommand(DrawCommand<P> doOnJFXThread)Adds a DrawCommandto the queue to be executed on the JavaFX thread.CommandQueueBuildercleanQueue()Clears the queue. Queue<DrawCommand<P>>buildCommandQueue()Builds the queue of commands. -
-
Method Detail
-
wrapAndAdd
CommandQueueBuilder wrapAndAdd(Supplier<Boolean> supplier, DrawCommand<P> doOnJFXThread)
Wraps a
DrawCommandaround to the queue to be executed on the JavaFX thread.- Parameters:
supplier- the boolean supplier that will check if the command should be executeddoOnJFXThread- the action to do
-
addCommand
CommandQueueBuilder addCommand(DrawCommand<P> doOnJFXThread)
Adds a
DrawCommandto the queue to be executed on the JavaFX thread.- Parameters:
doOnJFXThread- the action to do
-
cleanQueue
CommandQueueBuilder cleanQueue()
Clears the queue.
-
buildCommandQueue
Queue<DrawCommand<P>> buildCommandQueue()
Builds the queue of commands.
-
-
-
-