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 AudioEqualizerBuilderaddBands(Collection<? extends EqualizerBand> col) Calls theaddAllmethod on the ObservableList returned by theAudioEqualizer#getBands()method.final AudioEqualizerBuilderaddBands(EqualizerBand... elements) Calls theaddAllmethod 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 theAudioEqualizerclass.enabled(boolean value) A builder method that invokes thesetEnabledmethod on the instance being constructed.Applies a function to theenabledPropertyof the instance being constructed.
-
Method Details
-
build
Builds and returns an instance of theAudioEqualizerclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
AudioEqualizerclass
-
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 thesetEnabledmethod on the instance being constructed.- Returns:
- builder instance
-
addBands
Calls theaddAllmethod on the ObservableList returned by theAudioEqualizer#getBands()method.- Returns:
- builder instance
-
addBands
Calls theaddAllmethod on the ObservableList returned by theAudioEqualizer#getBands()method.- Returns:
- builder instance
-
enabledPropertyApply
Applies a function to theenabledPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.enabledProperty().bind(anotherProperty)) // Use shorthand form .enabledPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-