BooleanSignal
class BooleanSignal
Extends: Signal<Boolean>
Package: dev.joid.lib.signal.impl.primitive · Module: core · Source: BooleanSignal.java
Signal of a boolean, for a state that is on or off.
Description
Section titled “Description”It works like Signal and adds toggle().
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| BooleanSignal() | Creates a signal whose value and default value are false. | |
| BooleanSignal(boolean value) | Creates a signal whose value and default value are value. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
this | toggle() fluent | Inverts the 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”BooleanSignal
Section titled “BooleanSignal”BooleanSignal()
Creates a signal whose value and default value are false.
BooleanSignal(boolean value)
Creates a signal whose value and default value are value.
Method details
Section titled “Method details”toggle
Section titled “toggle”this toggle() fluent
Inverts the value, then returns this signal. Called from another thread, it inverts the value that the signal holds when the write applies on the render thread.
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
