Class AudioEqualizerBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.media.AudioEqualizerBuilder
The
AudioEqualizerBuilder
class constructs instances of the AudioEqualizer
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 AudioEqualizer
constructor
and returns an instance of the AudioEqualizerBuilder
.
You can use method chaining to call the builder methods for configuring the AudioEqualizer
.
Finally, invoke the build
method to generate an instance of the AudioEqualizer
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 TypeMethodDescriptionfinal AudioEqualizerBuilder
addBands
(Collection<? extends EqualizerBand> col) Calls theaddAll
method on the ObservableList returned by theAudioEqualizer#getBands()
method.final AudioEqualizerBuilder
addBands
(EqualizerBand... elements) Calls theaddAll
method on the ObservableList returned by theAudioEqualizer#getBands()
method.apply
(Consumer<AudioEqualizer> func) Applies a function to the AudioEqualizer instance being constructed.build()
Builds and returns an instance of theAudioEqualizer
class.enabled
(boolean value) A builder method that invokes thesetEnabled
method on the instance being constructed.Applies a function to theenabledProperty
of the instance being constructed.
-
Method Details
-
build
Builds and returns an instance of theAudioEqualizer
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
AudioEqualizer
class
-
apply
Applies a function to the AudioEqualizer instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
enabled
A builder method that invokes thesetEnabled
method on the instance being constructed.- Returns:
- builder instance
-
addBands
Calls theaddAll
method on the ObservableList returned by theAudioEqualizer#getBands()
method.- Returns:
- builder instance
-
addBands
Calls theaddAll
method on the ObservableList returned by theAudioEqualizer#getBands()
method.- Returns:
- builder instance
-
enabledPropertyApply
Applies a function to theenabledProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-