Class/Object

reactify

Var

Related Docs: object Var | package reactify

Permalink

class Var[T] extends Val[T] with Mutable[T]

Var represents the combination of Val and Channel into a stateful and mutable underlying value.

T

the type of value this Reactive receives

Linear Supertypes
Mutable[T], Val[T], Stateful[T], Reactive[T], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Var
  2. Mutable
  3. Val
  4. Stateful
  5. Reactive
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Var(f: ⇒ T)

    Permalink
  2. new Var()

    Permalink

    Attributes
    protected

Value Members

  1. def !(future: Future[T])(implicit ec: ExecutionContext): Future[Unit]

    Permalink

    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
    Mutable
  2. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  4. def &(that: Var[T]): Var[T]

    Permalink

    Group multiple Vars together

  5. def &(that: Val[T]): Val[T]

    Permalink

    Group multiple Vals together

    Group multiple Vals together

    Definition Classes
    Val
  6. def &(that: Stateful[T]): Stateful[T]

    Permalink

    Group multiple Statefuls together

    Group multiple Statefuls together

    Definition Classes
    Stateful
  7. def :=(f: ⇒ T): Unit

    Permalink

    Convenience alternative to "set"

    Convenience alternative to "set"

    Definition Classes
    Mutable
  8. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def @=(f: T): Unit

    Permalink

    Convenience alternative to "static"

    Convenience alternative to "static"

    Definition Classes
    Mutable
  10. var _references: Set[Val[_]]

    Permalink
    Attributes
    protected
    Definition Classes
    Val
  11. def and(that: Var[T]): Var[T]

    Permalink

    Group multiple Vars together

  12. def and(that: Val[T]): Val[T]

    Permalink

    Group multiple Vals together

    Group multiple Vals together

    Definition Classes
    Val
  13. def and(that: Stateful[T]): Stateful[T]

    Permalink

    Group multiple Statefuls together

    Group multiple Statefuls together

    Definition Classes
    Stateful
  14. def apply(): T

    Permalink

    Convenience wrapper around get

    Convenience wrapper around get

    Definition Classes
    Stateful
  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. def attach(f: (T) ⇒ Unit, priority: Double = Priority.Normal): Reaction[T]

    Permalink

    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
  17. def attachAndFire(f: (T) ⇒ Unit, priority: Double = Priority.Normal): Reaction[T]

    Permalink

    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
    Stateful
  18. def bind[V](that: Var[V], setNow: BindSet = BindSet.LeftToRight)(implicit t2v: (T) ⇒ V, v2t: (V) ⇒ T): Binding[T, V]

    Permalink

    Convenience method to create a binding between two Vars

    Convenience method to create a binding between two Vars

    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]

  19. def changes(f: (T, T) ⇒ Unit, priority: Double = Priority.Normal): Reaction[T]

    Permalink

    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
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def equality(t1: T, t2: T): Boolean

    Permalink
    Definition Classes
    Val
  23. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  24. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def fire(value: T, previous: Option[T], reactions: List[Reaction[T]] = this.reactions()): ReactionStatus

    Permalink

    Fires the value to the Reactions

    Fires the value to the Reactions

    Attributes
    protected
    Definition Classes
    Reactive
  26. var function: () ⇒ T

    Permalink
    Attributes
    protected
    Definition Classes
    Val
  27. def future(condition: (T) ⇒ Boolean = _ => true): Future[T]

    Permalink

    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
  28. def get: T

    Permalink

    Gets the current value from the current State

    Gets the current value from the current State

    Definition Classes
    ValStateful
  29. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  30. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. def map[R](f: (T) ⇒ R): Var[R]

    Permalink

    Maps this Var to another type.

    Maps this Var to another type.

    Note: this mapping loses all meaning if the new Var gets set explicitly with a new value

    Definition Classes
    VarVal
  33. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  36. def on(f: ⇒ Unit, priority: Double = Priority.Normal): Reaction[T]

    Permalink

    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
  37. def once(f: (T) ⇒ Unit, condition: (T) ⇒ Boolean = _ => true, priority: Double = Priority.Normal): Reaction[T]

    Permalink

    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
  38. def option: Option[T]

    Permalink
    Definition Classes
    Val
  39. var previous: Option[T]

    Permalink
    Attributes
    protected
    Definition Classes
    Val
  40. lazy val reactions: Reactions[T]

    Permalink

    Reactions currently associated with this Reactive

    Reactions currently associated with this Reactive

    Definition Classes
    Reactive
  41. def references: Set[Val[_]]

    Permalink
    Definition Classes
    Val
  42. def set(value: ⇒ T): Unit

    Permalink

    Sets a new functional value to this var

    Sets a new functional value to this var

    value

    the functional value to assign

    Definition Classes
    VarMutableVal
  43. var state: Try[T]

    Permalink
    Attributes
    protected
    Definition Classes
    Val
  44. def static(value: T): Unit

    Permalink

    Statically sets a value without monitoring effects

    Statically sets a value without monitoring effects

    value

    the value to assign

    Definition Classes
    VarMutableVal
  45. def status: Option[ReactionStatus]

    Permalink

    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
  46. def status_=(status: ReactionStatus): Unit

    Permalink
    Definition Classes
    Reactive
  47. def stopPropagation(): Unit

    Permalink

    Shortcut functionality to call status = ReactionStatus.Stop

    Shortcut functionality to call status = ReactionStatus.Stop

    Definition Classes
    Reactive
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def toString(): String

    Permalink
    Definition Classes
    Val → AnyRef → Any
  50. def toTry: Try[T]

    Permalink
    Definition Classes
    Val
  51. def update(f: ⇒ T): Unit

    Permalink

    Convenience alternative to "set"

    Convenience alternative to "set"

    Definition Classes
    Mutable
  52. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Mutable[T]

Inherited from Val[T]

Inherited from Stateful[T]

Inherited from Reactive[T]

Inherited from AnyRef

Inherited from Any

Ungrouped