Convenience functionality to assign the result of a future (upon completion) to this Channel
Convenience functionality to assign the result of a future (upon completion) to this Channel
Group multiple Statefuls together
Group multiple Statefuls together
Group multiple Statefuls together
Group multiple Statefuls together
Convenience wrapper around get
Convenience wrapper around get
Convenience method to create a Reaction to attach to this Reactive
Convenience method to create a Reaction to attach to this Reactive
the function reaction
the priority in comparison to other reactions (Defaults to Priority.Normal)
created Reaction[T]
Convenience functionality to attach a Reaction and immediately fire the current state on the Reaction.
Convenience functionality to attach a Reaction and immediately fire the current state on the Reaction.
the function reaction
the priority in comparison to other reactions (Defaults to Priority.Normal)
Reaction[T]
Convenience method to create a Reaction to monitor changes to this Reactive
Convenience method to create a Reaction to monitor changes to this Reactive
the function reaction to receive changes
the priority in comparison to other reactions (Defaults to Priority.Normal)
created Reaction[T]
Fires the value to the Reactions
Fires the value to the Reactions
Convenience method to create a Future[T]
that will complete upon the next reaction that meets to supplied
condition.
Convenience method to create a Future[T]
that will complete upon the next reaction that meets to supplied
condition.
optional condition that must be true for this to fire (Defaults to accept anything)
Future[T]
Gets the current value
Convenience method to create a Reaction to monitor changes to this Reactive when you don't care about the actual value.
Convenience method to create a Reaction to monitor changes to this Reactive when you don't care about the actual value.
the function reaction to invoke in reaction to a value received
the priority in comparison to other reactions (Defaults to Priority.Normal)
created Reaction[T]
Convenience method to create a Reaction to monitor a single reaction based on an optional condition.
Convenience method to create a Reaction to monitor a single reaction based on an optional condition.
the function reaction
optional condition that must be true for this to fire (Defaults to accept anything)
the priority in comparison to other reactions (Defaults to Priority.Normal)
created Reaction[T]
Reactions currently associated with this Reactive
Reactions currently associated with this Reactive
If the current thread is reacting to a value currently, status represents the status of the reaction.
If the current thread is reacting to a value currently, status represents the status of the reaction. This can be set to ReactionStatus.Stop in order to stop propagation. This can also be achieved via stopPropagation().
Shortcut functionality to call status = ReactionStatus.Stop
Shortcut functionality to call status = ReactionStatus.Stop
Dep allows creation of a dependent
Var
on anotherVar
allowing conversion between the two. This can be useful for different representations of the same value. For example, in a graphical environmentleft
,center
, andright
are all different representations of the value (horizontal position). Maintaining three distinct values while keeping them in-sync is painful. WithDep
you can simply define oneVar
and twoDep
values like:val left: Var[Double] = Var(0.0) val width: Var[Double] = Var(0.0) val center: Dep[Double, Double] = Dep(left)(_ + (width / 2.0), _ - (width / 2.0)) val right: Dep[Double, Double] = Dep(left)(_ + width, _ - width)
Now, modification to
left
,center
, orright
will maintain the appropriate value for each without any additional boilerplate.the type of value this Reactive receives
the type that this Dep receives