Class EqualizerBandBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.media.EqualizerBandBuilder
The
EqualizerBandBuilder
class constructs instances of the EqualizerBand
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 EqualizerBand
constructor
and returns an instance of the EqualizerBandBuilder
.
You can use method chaining to call the builder methods for configuring the EqualizerBand
.
Finally, invoke the build
method to generate an instance of the EqualizerBand
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 TypeMethodDescriptionapply
(Consumer<EqualizerBand> func) Applies a function to the EqualizerBand instance being constructed.bandwidth
(double value) A builder method that invokes thesetBandwidth
method on the instance being constructed.Applies a function to thebandwidthProperty
of the instance being constructed.build()
Builds and returns an instance of theEqualizerBand
class.centerFrequency
(double value) A builder method that invokes thesetCenterFrequency
method on the instance being constructed.Applies a function to thecenterFrequencyProperty
of the instance being constructed.static EqualizerBandBuilder
create()
Returns an instance of theEqualizerBandBuilder
.static EqualizerBandBuilder
create
(double centerFrequency, double bandwidth, double gain) Accepts the constructor arguments ofEqualizerBand(double, double, double)
and returns an instance ofEqualizerBandBuilder
.gain
(double value) A builder method that invokes thesetGain
method on the instance being constructed.Applies a function to thegainProperty
of the instance being constructed.
-
Method Details
-
create
Returns an instance of theEqualizerBandBuilder
.- Returns:
- an instance of the
EqualizerBandBuilder
.
-
create
Accepts the constructor arguments ofEqualizerBand(double, double, double)
and returns an instance ofEqualizerBandBuilder
.- Returns:
- an instance of the
EqualizerBandBuilder
.
-
build
Builds and returns an instance of theEqualizerBand
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
EqualizerBand
class
-
apply
Applies a function to the EqualizerBand instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
bandwidth
A builder method that invokes thesetBandwidth
method on the instance being constructed.- Returns:
- builder instance
-
centerFrequency
A builder method that invokes thesetCenterFrequency
method on the instance being constructed.- Returns:
- builder instance
-
gain
A builder method that invokes thesetGain
method on the instance being constructed.- Returns:
- builder instance
-
bandwidthPropertyApply
Applies a function to thebandwidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
centerFrequencyPropertyApply
Applies a function to thecenterFrequencyProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
gainPropertyApply
Applies a function to thegainProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-