Skip to content

DoubleSignal

class DoubleSignal
Extends: Signal<Double>
Package: dev.joid.lib.signal.impl.primitive · Module: core · Source: DoubleSignal.java

Signal of a double with arithmetic that writes its result, for positions, amounts and measures.

It works like IntegerSignal with double values and the Java floating-point rules: dividing by 0D gives an infinity or NaN, without exception.

ReturnsSignatureSummary
DoubleSignal()Creates a signal whose value and default value are 0D.
DoubleSignal(double value)Creates a signal whose value and default value are value.

ReturnsSignatureSummary
thisincrement() fluentAdds 1D to the value, then returns this signal.
thisdecrement() fluentRemoves 1D from the value, then returns this signal.
thisadd(double value) fluentAdds value to the value, then returns this signal.
thissubtract(double value) fluentRemoves value from the value, then returns this signal.
thismultiply(double value) fluentMultiplies the value by value, then returns this signal.
thisdivide(double value) fluentDivides the value by value, then returns this signal.
Inherited from Signal (12)

batch · silent · get · peek · isPresent · isWritable · toString · from · set · reset · removeOnChange · map

Inherited from Signal (1)

onChange

DoubleSignal()

Creates a signal whose value and default value are 0D.

DoubleSignal(double value)

Creates a signal whose value and default value are value.

this increment() fluent

Adds 1D to the value, then returns this signal.

this decrement() fluent

Removes 1D from the value, then returns this signal.

this add(double value) fluent

Adds value to the value, then returns this signal.

this subtract(double value) fluent

Removes value from the value, then returns this signal.

this multiply(double value) fluent

Multiplies the value by value, then returns this signal.

this divide(double 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

Report a problem with this page