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 thesetBandwidthmethod on the instance being constructed.Applies a function to thebandwidthPropertyof the instance being constructed.build()Builds and returns an instance of theEqualizerBandclass.centerFrequency(double value) A builder method that invokes thesetCenterFrequencymethod on the instance being constructed.Applies a function to thecenterFrequencyPropertyof the instance being constructed.static EqualizerBandBuildercreate()Returns an instance of theEqualizerBandBuilder.static EqualizerBandBuildercreate(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 thesetGainmethod on the instance being constructed.Applies a function to thegainPropertyof 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 theEqualizerBandclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
EqualizerBandclass
-
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 thesetBandwidthmethod on the instance being constructed.- Returns:
- builder instance
-
centerFrequency
A builder method that invokes thesetCenterFrequencymethod on the instance being constructed.- Returns:
- builder instance
-
gain
A builder method that invokes thesetGainmethod on the instance being constructed.- Returns:
- builder instance
-
bandwidthPropertyApply
Applies a function to thebandwidthPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.bandwidthProperty().bind(anotherProperty)) // Use shorthand form .bandwidthPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
centerFrequencyPropertyApply
Applies a function to thecenterFrequencyPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.centerFrequencyProperty().bind(anotherProperty)) // Use shorthand form .centerFrequencyPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
gainPropertyApply
Applies a function to thegainPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.gainProperty().bind(anotherProperty)) // Use shorthand form .gainPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-