Stateful

trait Stateful[T] extends Reactive[T]
trait Reactive[T]
class Object
trait Matchable
class Any
class Dep[T, R]
class Val[T]
class Var[T]
class VarGroup[T]
class ValGroup[T]
class StatefulGroup[T]

Value members

Abstract methods

def get: T

Gets the current value

Gets the current value

Concrete methods

def &(that: Stateful[T]): Stateful[T]

Group multiple Statefuls together

Group multiple Statefuls together

def and(that: Stateful[T]): Stateful[T]

Group multiple Statefuls together

Group multiple Statefuls together

def apply(): T

Convenience wrapper around get

Convenience wrapper around get

def attachAndFire(f: T => Unit, priority: Double): 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.

Value Params
f

the function reaction

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

Reaction[T]

Inherited methods

def attach(f: T => Unit, priority: Double): Reaction[T]

Convenience method to create a Reaction to attach to this Reactive

Convenience method to create a Reaction to attach to this Reactive

Value Params
f

the function reaction

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
def changes(f: (T, T) => Unit, priority: Double): 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

Value Params
f

the function reaction to receive changes

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
def future(condition: T => Boolean): Future[T]

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.

Value Params
condition

optional condition that must be true for this to fire (Defaults to accept anything)

Returns

Future[T]

Inherited from
Reactive
def on(f: => Unit, priority: Double): Reaction[T]

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.

Value Params
f

the function reaction to invoke in reaction to a value received

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
def once(f: T => Unit, condition: T => Boolean, priority: Double): 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.

Value Params
condition

optional condition that must be true for this to fire (Defaults to accept anything)

f

the function reaction

priority

the priority in comparison to other reactions (Defaults to Priority.Normal)

Returns

created Reaction[T]

Inherited from
Reactive
def status: Option[ReactionStatus]

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().

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().

Inherited from
Reactive
def status_=(status: ReactionStatus): Unit
Inherited from
Reactive
def stopPropagation(): Unit

Shortcut functionality to call status = ReactionStatus.Stop

Shortcut functionality to call status = ReactionStatus.Stop

Inherited from
Reactive

Inherited fields

lazy val reactions: Reactions[T]

Reactions currently associated with this Reactive

Reactions currently associated with this Reactive

Inherited from
Reactive