class ReadWriteVar[T] extends UpdatableVar[T]
Java adaptation of Var[T] with Updatable[T] with Extractable[T]
.
- Alphabetic
- By Inheritance
- ReadWriteVar
- UpdatableVar
- Extractable
- Updatable
- Var
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ReadWriteVar(init: T)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(): T
- Definition Classes
- UpdatableVar → Extractable
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- lazy val changes: Event[T]
An Event where changes in Var are emitted.
An Event where changes in Var are emitted. The current value of this Var is emitted synchronously upon subscription.
All changes to this Var are guaranteed to be published to the Event.
- Definition Classes
- Var
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def diff[CC[_], U](implicit arg0: Diffable[CC], toCC: <:<[T, CC[U]]): Event[Diff[CC, U]]
Produce an Event reflecting the differences between each update to this Var.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap[U](f: (T) => Var[U]): Var[U]
Create a dependent Var which behaves as
f
applied to the current value of this Var.Create a dependent Var which behaves as
f
applied to the current value of this Var. FlatMap manages a dynamic dependency graph: the dependent Var is detached and recomputed whenever the outer Var changes, but only if there are any observers. An unobserved Var returned by flatMap will not invokef
- Definition Classes
- Var
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def join[U](other: Var[U]): Var[(T, U)]
- Definition Classes
- Var
- def map[U](f: (T) => U): Var[U]
Create a derived variable by applying
f
to the contained value.Create a derived variable by applying
f
to the contained value.- Definition Classes
- Var
- 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 observe(depth: Int, obs: Observer[T]): Closable
Concrete implementations of Var implement observe.
Concrete implementations of Var implement observe. This is called for each toplevel observe. Depths indicate the relative structural depth of the observation, from the frame of reference of the root call to observe. (Each Var derived via flatMap increases the depth.) Depths are used to order the invocation of update callbacks. This is used to ensure that updates proceed in topological order so that every input variable is fully resolved before recomputing a derived variable.
- Attributes
- protected
- Definition Classes
- UpdatableVar → Var
- def sample(): T
- Definition Classes
- Var
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- UpdatableVar → AnyRef → Any
- def update(newValue: T): Unit
Update the container with value
t
Update the container with value
t
- Definition Classes
- UpdatableVar → Updatable
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()