Class/Object

com.outr.props

Var

Related Docs: object Var | package props

Permalink

class Var[T] extends StateChannel[T] with MonitoringState[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

Linear Supertypes
MonitoringState[T], StateChannel[T], State[T], Channel[T], Observable[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Var
  2. MonitoringState
  3. StateChannel
  4. State
  5. Channel
  6. Observable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def :=(value: ⇒ T): Unit

    Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  5. def apply(): T

    Permalink
    Definition Classes
    State
  6. def asChannel: Channel[T]

    Permalink

    Casts this instance as a Channel[T].

    Casts this instance as a Channel[T]. This is useful for representing sub-classes explicitly as a Channel.

    returns

    Channel[T]

    Definition Classes
    Channel
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def asState: State[T]

    Permalink
    Definition Classes
    State
  9. def attach(f: (T) ⇒ Unit): (T) ⇒ Unit

    Permalink
    Definition Classes
    Observable
  10. def attachAndFire(f: (T) ⇒ Unit): (T) ⇒ Unit

    Permalink
    Definition Classes
    State
  11. def changes(listener: ChangeListener[T]): (T) ⇒ Unit

    Permalink
    Definition Classes
    StateObservable
  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def detach(f: (T) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Observable
  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def fire(value: T): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Observable
  18. def get: T

    Permalink
    Definition Classes
    State
  19. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  22. def mod(f: (T) ⇒ T): Unit

    Permalink
    Definition Classes
    StateChannel
  23. def monitor(f: ⇒ T): T

    Permalink

    Called when assigning the value.

    Called when assigning the value. This method removes any existing monitored Observables, determines the new Observables from the supplied function f, and monitors changes to any of those.

    f

    the function to monitor

    returns

    T

    Attributes
    protected
    Definition Classes
    MonitoringState
  24. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  27. def set(value: ⇒ T): Unit

    Permalink

    Sets the value on this Var.

    Sets the value on this Var.

    value

    the value to apply

    Definition Classes
    VarChannel
  28. def setStatic(value: T): Unit

    Permalink

    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

  29. def state: T

    Permalink
    Attributes
    protected
    Definition Classes
    VarState
  30. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  32. def toVal: Val[T]

    Permalink

    Convenience method to wrap this Var into a Val.

  33. def value: T

    Permalink

    Convenience method to get the current value.

  34. def value_=(t: ⇒ T): Unit

    Permalink

    Convenience method to set the current value like a variable.

  35. final def wait(): Unit

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

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

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

Inherited from MonitoringState[T]

Inherited from StateChannel[T]

Inherited from State[T]

Inherited from Channel[T]

Inherited from Observable[T]

Inherited from AnyRef

Inherited from Any

Ungrouped