Class MnemonicBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.MnemonicBuilder
The
MnemonicBuilder class constructs instances of the Mnemonic class
and offers a fluent interface for creating and configuring it.
This class includes a static create method that accepts the same arguments as the original Mnemonic constructor
and returns an instance of the MnemonicBuilder.
You can use method chaining to call the builder methods for configuring the Mnemonic.
Finally, invoke the build method to generate an instance of the Mnemonic class.
Note that intermediate builder methods are not evaluated until the build method
is called, meaning they are evaluated lazily.
- Author:
- Hidekazu Kubota <hidekazu.kubota@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionApplies a function to the Mnemonic instance being constructed.build()Builds and returns an instance of theMnemonicclass.static MnemonicBuildercreate(Node node, KeyCombination keyCombination) Accepts the constructor arguments ofMnemonic(Node, KeyCombination)and returns an instance ofMnemonicBuilder.keyCombination(KeyCombination keyCombination) A builder method that invokes thesetKeyCombinationmethod on the instance being constructed.A builder method that invokes thesetNodemethod on the instance being constructed.
-
Method Details
-
create
Accepts the constructor arguments ofMnemonic(Node, KeyCombination)and returns an instance ofMnemonicBuilder.- Returns:
- an instance of the
MnemonicBuilder.
-
build
-
apply
Applies a function to the Mnemonic instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
keyCombination
A builder method that invokes thesetKeyCombinationmethod on the instance being constructed.- Returns:
- builder instance
-
node
A builder method that invokes thesetNodemethod on the instance being constructed.- Returns:
- builder instance
-