FloatSignal
class FloatSignal
Extends: Signal<Float>
Package: dev.joid.lib.signal.impl.primitive · Module: core · Source: FloatSignal.java
Signal of a float with arithmetic that writes its result, for ratios, progress and sizes.
Description
Section titled “Description”It works like IntegerSignal with float values and the Java floating-point rules: dividing by 0F gives an infinity or NaN, without exception.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| FloatSignal() | Creates a signal whose value and default value are 0F. | |
| FloatSignal(float value) | Creates a signal whose value and default value are value. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
this | increment() fluent | Adds 1F to the value, then returns this signal. |
this | decrement() fluent | Removes 1F from the value, then returns this signal. |
this | add(float value) fluent | Adds value to the value, then returns this signal. |
this | subtract(float value) fluent | Removes value from the value, then returns this signal. |
this | multiply(float value) fluent | Multiplies the value by value, then returns this signal. |
this | divide(float value) fluent | Divides the value by value, then returns this signal. |
Inherited from Signal (12)
batch · silent · get · peek · isPresent · isWritable · toString · from · set · reset · removeOnChange · map
Events
Section titled “Events”Creation details
Section titled “Creation details”FloatSignal
Section titled “FloatSignal”FloatSignal()
Creates a signal whose value and default value are 0F.
FloatSignal(float value)
Creates a signal whose value and default value are value.
Method details
Section titled “Method details”increment
Section titled “increment”this increment() fluent
Adds 1F to the value, then returns this signal.
decrement
Section titled “decrement”this decrement() fluent
Removes 1F from the value, then returns this signal.
this add(float value) fluent
Adds value to the value, then returns this signal.
subtract
Section titled “subtract”this subtract(float value) fluent
Removes value from the value, then returns this signal.
multiply
Section titled “multiply”this multiply(float value) fluent
Multiplies the value by value, then returns this signal.
divide
Section titled “divide”this divide(float value) fluent
Divides the value by value, then returns this signal.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
