Skip to content

ToggleState

final class ToggleState<T, B>
Package: dev.joid.lib.ui.node.impl.control.toggle · Module: core · Source: ToggleState.java

The two values that a toggle stands for, one while it is on and one while it is off.

BaseToggleNode.state creates one.

ReturnsSignatureSummary
ToggleState<T,B>of(T toggle, B back) factoryCreates the pair from the value while on and the value while off.

ReturnsSignatureSummary
TgetToggle()Returns the value while the toggle is on.
BgetBack()Returns the value while the toggle is off.

<T, B> ToggleState<T,B> of(T toggle, B back) factory

Creates the pair from the value while on and the value while off.

T getToggle()

Returns the value while the toggle is on.

B getBack()

Returns the value while the toggle is off.


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