Skip to content

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.

It works like Signal and adds toggle().

ReturnsSignatureSummary
BooleanSignal()Creates a signal whose value and default value are false.
BooleanSignal(boolean value)Creates a signal whose value and default value are value.

ReturnsSignatureSummary
thistoggle() fluentInverts the 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

BooleanSignal()

Creates a signal whose value and default value are false.

BooleanSignal(boolean value)

Creates a signal whose value and default value are value.

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

Report a problem with this page