trait Var[T] extends Val[T] with Channel[T]
Var represents the combination of Val
and Channel
into a stateful and mutable underlying value.
- T
the type of value this Reactive receives
- Alphabetic
- By Inheritance
- Var
- Channel
- Val
- Reactive
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
mode: Mode
Operating mode of this Var.
Operating mode of this Var. Defaults to
Normal
-
abstract
def
set(value: ⇒ T): Unit
Public method to fire a value against the Reactions attached to this Channel
Public method to fire a value against the Reactions attached to this Channel
- value
the function value
- Definition Classes
- Channel
-
abstract
def
state: State[T]
The current State representation
The current State representation
- Definition Classes
- Val
Concrete Value Members
-
def
!(future: Future[T]): Future[Unit]
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
- Definition Classes
- Channel
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
&(that: Var[T]): Var[T]
Group multiple Vars together
-
def
&(that: Channel[T]): Channel[T]
Group multiple channels together
Group multiple channels together
- Definition Classes
- Channel
-
def
&(that: Val[T]): Val[T]
Group multiple Vals together
Group multiple Vals together
- Definition Classes
- Val
-
def
:=(value: ⇒ T): Unit
Convenience method to fire a value
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
@=(value: T): Unit
Convenience method for static (non-functional) invocation.
Convenience method for static (non-functional) invocation.
- value
the value
- Definition Classes
- Channel
- See also
#set
-
def
and(that: Var[T]): Var[T]
Group multiple Vars together
-
def
and(that: Channel[T]): Channel[T]
Group multiple channels together
Group multiple channels together
- Definition Classes
- Channel
-
def
and(that: Val[T]): Val[T]
Group multiple Vals together
Group multiple Vals together
- Definition Classes
- Val
-
def
apply(): T
Convenience wrapper around
get
Convenience wrapper around
get
- Definition Classes
- Val
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
attach(f: (T) ⇒ Unit, priority: Double = Priority.Normal): Reaction[T]
Convenience method to create a Reaction to attach to this Reactive
Convenience method to create a Reaction to attach to this Reactive
- f
the function reaction
- priority
the priority in comparison to other reactions (Defaults to Priority.Normal)
- returns
created Reaction[T]
- Definition Classes
- Reactive
-
def
attachAndFire(f: (T) ⇒ Unit, priority: Double = Priority.Normal): 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.
- f
the function reaction
- priority
the priority in comparison to other reactions (Defaults to Priority.Normal)
- returns
Reaction[T]
- Definition Classes
- Val
-
def
bind[V](that: Var[V], setNow: BindSet = BindSet.LeftToRight)(implicit t2v: (T) ⇒ V, v2t: (V) ⇒ T): Binding[T, V]
Convenience method to create a binding between two
Var
sConvenience method to create a binding between two
Var
s- V
the type of the second
Var
- that
the second
Var
to bind between- setNow
the
BindSet
value (Defaults to LeftToRight)- t2v
implicit function conversion from T to V
- v2t
implicit function conversion from V to T
- returns
Binding[T, V]
-
def
changes(f: (T, T) ⇒ Unit, priority: Double = 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
- f
the function reaction to receive changes
- priority
the priority in comparison to other reactions (Defaults to Priority.Normal)
- returns
created Reaction[T]
- Definition Classes
- Reactive
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
collect[R](f: PartialFunction[T, R]): Channel[R]
Functional collection of this Channel into another Channel.
Functional collection of this Channel into another Channel. All values received by this Channel will be collected and forwarded to the new Channel if they are collected by the conversion function.
- R
the type of the Channel
- f
conversion partial function
- returns
Channel[R]
- Definition Classes
- Channel
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fire(value: T, previous: Option[T], reactions: List[Reaction[T]] = this.reactions()): ReactionStatus
Fires the value to the Reactions
Fires the value to the Reactions
- Attributes
- protected
- Definition Classes
- Reactive
-
def
future(condition: (T) ⇒ Boolean = _ => true): 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.- condition
optional condition that must be true for this to fire (Defaults to accept anything)
- returns
Future[T]
- Definition Classes
- Reactive
-
def
get: T
Gets the current value from the current
State
Gets the current value from the current
State
- Definition Classes
- Val
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[R](f: (T) ⇒ R): Var[R]
Functional mapping of this Var into another Var.
-
def
name: Option[String]
An optional name associated.
An optional name associated. This is primarily used for distinguishing between instances as well as logging.
- Definition Classes
- Reactive
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
on(f: ⇒ Unit, priority: Double = Priority.Normal): 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.
- 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]
- Definition Classes
- Reactive
-
def
once(f: (T) ⇒ Unit, condition: (T) ⇒ Boolean = _ => true, priority: Double = Priority.Normal): 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.
- f
the function reaction
- condition
optional condition that must be true for this to fire (Defaults to accept anything)
- priority
the priority in comparison to other reactions (Defaults to Priority.Normal)
- returns
created Reaction[T]
- Definition Classes
- Reactive
-
lazy val
reactions: Reactions[T]
Reactions currently associated with this Reactive
Reactions currently associated with this Reactive
- Definition Classes
- Reactive
-
def
static(value: T): Unit
Statically sets a value without monitoring effects
Statically sets a value without monitoring effects
- value
the value to assign
-
def
status: Option[ReactionStatus]
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().
- Definition Classes
- Reactive
-
def
status_=(status: ReactionStatus): Unit
- Definition Classes
- Reactive
-
def
stopPropagation(): Unit
Shortcut functionality to call
status = ReactionStatus.Stop
Shortcut functionality to call
status = ReactionStatus.Stop
- Definition Classes
- Reactive
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toString(): String
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )