Class NumberAxisDefaultFormatterBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.controls.NumberAxisDefaultFormatterBuilder
The
NumberAxisDefaultFormatterBuilder
class constructs instances of the DefaultFormatter
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 DefaultFormatter
constructor
and returns an instance of the NumberAxisDefaultFormatterBuilder
.
You can use method chaining to call the builder methods for configuring the DefaultFormatter
.
Finally, invoke the build
method to generate an instance of the DefaultFormatter
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 DefaultFormatter instance being constructed.build()
Builds and returns an instance of theDefaultFormatter
class.create
(NumberAxis axis) Accepts the constructor arguments ofDefaultFormatter(NumberAxis)
and returns an instance ofNumberAxisDefaultFormatterBuilder
.create
(NumberAxis axis, String prefix, String suffix) Accepts the constructor arguments ofDefaultFormatter(NumberAxis, String, String)
and returns an instance ofNumberAxisDefaultFormatterBuilder
.
-
Method Details
-
create
Accepts the constructor arguments ofDefaultFormatter(NumberAxis)
and returns an instance ofNumberAxisDefaultFormatterBuilder
.- Returns:
- an instance of the
NumberAxisDefaultFormatterBuilder
.
-
create
public static NumberAxisDefaultFormatterBuilder create(NumberAxis axis, String prefix, String suffix) Accepts the constructor arguments ofDefaultFormatter(NumberAxis, String, String)
and returns an instance ofNumberAxisDefaultFormatterBuilder
.- Returns:
- an instance of the
NumberAxisDefaultFormatterBuilder
.
-
build
Builds and returns an instance of theDefaultFormatter
class.Intermediate builder methods are not evaluated until the
build
method is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
DefaultFormatter
class
-
apply
Applies a function to the DefaultFormatter instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-