class Var[T] extends AbstractState[T] with StateChannel[T]
Var, as the name suggests, is very similar to a Scala var
. The value is defined during instantiation, but may be
modified later. The value may be a static value, or may be a derived value depending on multiple Observables
. If
Observables
make up the value they will be monitored and events fired on this Observable
as the value changes.
- T
the type of value this channel receives
- Alphabetic
- By Inheritance
- Var
- StateChannel
- Channel
- AbstractState
- State
- Observable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Var(function: () ⇒ T, distinct: Boolean, cache: Boolean)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
:=(value: ⇒ T): Unit
Convenience method to send a value to
set
similarly to an assignment operator.Convenience method to send a value to
set
similarly to an assignment operator.- value
the value to apply
- Definition Classes
- Channel
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(): T
- Definition Classes
- State
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
attach(f: (T) ⇒ Unit): (T) ⇒ Unit
- Definition Classes
- Observable
-
def
attachAndFire(f: (T) ⇒ Unit): (T) ⇒ Unit
- Definition Classes
- State
-
def
changes(listener: ChangeListener[T]): (T) ⇒ Unit
- Definition Classes
- State → Observable
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
detach(f: (T) ⇒ Unit): Unit
- Definition Classes
- Observable
-
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): Unit
- Attributes
- protected[reactify]
- Definition Classes
- Observable
-
def
get(cache: Boolean): T
- Definition Classes
- AbstractState
-
def
get: T
- Definition Classes
- AbstractState → State
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
observing: Set[Observable[_]]
- Definition Classes
- AbstractState → State
-
def
replace(function: () ⇒ T): Unit
- Attributes
- protected
- Definition Classes
- AbstractState
-
def
set(value: ⇒ T): Unit
Fires the value to all attached listeners.
Fires the value to all attached listeners.
- value
the value to apply
- Definition Classes
- Var → Channel → AbstractState
-
def
setStatic(value: T): Unit
Convenience method to pre-evaluate the value instead of as an anonymous function.
Convenience method to pre-evaluate the value instead of as an anonymous function.
- value
the value to be set
- Definition Classes
- Var → AbstractState
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
value: T
- Definition Classes
- State
-
def
value_=(value: ⇒ T): Unit
Convenience method to set the current value like a variable.
-
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
- @throws( ... )