org.reactress

Signal

trait Signal[+T] extends Reactive[T]

A special type of a reactive value that caches the last emitted event.

This last event is called the signal's value. It can be read using the Signal's apply method.

T

the type of the events in this signal

Self Type
Signal[T]
Linear Supertypes
Reactive[T], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Signal
  2. Reactive
  3. AnyRef
  4. Any
Implicitly
  1. by ReactiveOps
  2. by SignalOps
  3. by any2stringadd
  4. by any2stringfmt
  5. by any2ArrowAssoc
  6. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(): T

    Returns the last event produced by this signal.

    Returns the last event produced by this signal.

    returns

    the signal's value

  2. abstract def onReaction(reactor: Reactor[T]): Subscription

    Attaches a new reactor to this reactive that is called multiple times when an event is produced and once when the reactive is terminated.

    Attaches a new reactor to this reactive that is called multiple times when an event is produced and once when the reactive is terminated.

    Reactives can create events specifically for this reactor, in which case they are called passive. A passive reactive can create events both synchronously and asynchronously, but it will only do so on its own isolate.

    An active reactive value will produce events irregardless of the reactors subscribed to it. Subscribing to an active reactive value only forwards those events that have been produced after the subscription started.

    reactor

    the reactor that accepts react and unreact events

    returns

    a subscription for unsubscribing from reactions

    Definition Classes
    Reactive

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

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

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Signal[T] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Signal[T], B)

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ArrowAssoc[Signal[T]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def after[S](that: Reactive[S]): Reactive[T] with Subscription

    Creates a new reactive value that produces events from this reactive value only after that produces an event.

    Creates a new reactive value that produces events from this reactive value only after that produces an event.

    After that emits some event, all events from this are produced on the resulting reactive. If that unreacts before an event is produced on this, the resulting reactive unreacts. If this unreacts, the resulting reactive unreacts.

    S

    the type of that reactive

    that

    the reactive after whose first event the result can start propagating events

    returns

    a subscription and the resulting reactive that emits only after that emits at least once.

    Definition Classes
    Reactive
  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def asSignal: ReactiveOps[T] with Signal[T]

    Downcasts this reactive into a signal.

    Downcasts this reactive into a signal.

    Throws an exception if the current reactive is not a signal.

    returns

    the signal version of the current reactive

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
  11. def asSignalOrElse(init: T): Signal[T]

    If the current reactive is a signal already this method downcasts it, otherwise it lifts it into a signal with the initial value init.

    If the current reactive is a signal already this method downcasts it, otherwise it lifts it into a signal with the initial value init.

    init

    optional value to use when converting the reactive to a signal

    returns

    the signal version of the current reactive

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
  12. def changes: Signal[T] with Subscription

    A signal that only emits events when the value of this signal changes.

    A signal that only emits events when the value of this signal changes.

    time    --------------->
    this    --1---2--2--3-->
    changes --1---2-----3-->
    returns

    a subscription and the signal with changes of this

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def collect[S <: AnyRef](pf: PartialFunction[T, S])(implicit evidence: <:<[T, AnyRef]): Reactive[S] with Subscription

    Filters events from this reactive and maps them in the same time.

    Filters events from this reactive and maps them in the same time.

    The collect combinator uses a partial function pf to filter events from this reactive. Events for which the partial function is defined are mapped using the partial function, others are discarded.

    Note: This combinator is defined only for reactives that contain reference events. You cannot call it for reactives whose events are primitive values, such as Int. This is because the PartialFunction class is not specialized.

    S

    the type of the mapped reactive

    pf

    partial function used to filter and map events

    evidence

    evidence that T is a reference type

    returns

    a subscription and a reactive value with the partially mapped events

    Definition Classes
    Reactive
  15. def concat[S]()(implicit evidence: <:<[T, Reactive[S]], a: Arrayable[S], b: CanBeBuffered): Reactive[S] with Subscription

    Concatenates the events produced by all the reactives emitted by this.

    Concatenates the events produced by all the reactives emitted by this.

    This operation is only available for reactive values that emit other reactives as events. Once this and all the reactives unreact, this reactive unreacts.

    Use case:

    def concat[S](): Reactive[S]
    S

    the type of the events in reactives emitted by this

    evidence

    evidence that events of type T produced by this are actually reactive values of type S

    a

    evidence that arrays can be created for type S

    b

    evidence that buffering events is allowed

    returns

    a subscription and the reactive that concatenates all the events

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
    Note

    This operation potentially buffers events from the nested reactives. Unless each reactive emitted by this is known to unreact eventually, this operation should not be called. To enforce this, clients are required to import the CanBeBuffered evidence explicitly into the scope in which they call concat.

  16. def concat(that: Reactive[T])(implicit a: Arrayable[T], b: CanBeBuffered): Reactive[T] with Subscription

    Creates a concatenation of this and that reactive.

    Creates a concatenation of this and that reactive.

    The resulting reactive value produces all the events from this reactive until this unreacts, and then outputs all the events from that that happened before and after this unreacted. To do this, this operation potentially caches all the events from that. When that unreacts, the resulting reactive value unreacts.

    Use case:

    def concat(that: Reactive[T]): Reactive[T]
    that

    another reactive value for the concatenation

    a

    evidence that arrays can be created for the type T

    b

    evidence that the client allows events from that to be buffered

    returns

    a subscription and a reactive value that concatenates events from this and that

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
    Note

    This operation potentially caches events from that. Unless certain that this eventually unreacts, concat should not be used. To enforce this, clients must import the CanBeBuffered evidence explicitly into the scope in which they call concat.

  17. def diffPast[S](z: S)(op: (T, T) ⇒ S): Signal[S] with Subscription

    A signal that produces difference events between the current and previous value of this signal.

    A signal that produces difference events between the current and previous value of this signal.

    time ---------------->
    this --1--3---6---7-->
    diff --z--2---3---1-->
    S

    the type of the difference event

    z

    the initial value for the difference

    op

    the operator that computes the difference between consecutive events

    returns

    a subscription and a signal with the difference value

  18. def ensuring(cond: (Signal[T]) ⇒ Boolean, msg: ⇒ Any): Signal[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to Ensuring[Signal[T]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: (Signal[T]) ⇒ Boolean): Signal[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to Ensuring[Signal[T]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: Boolean, msg: ⇒ Any): Signal[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to Ensuring[Signal[T]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean): Signal[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to Ensuring[Signal[T]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  24. def filter(p: (T) ⇒ Boolean): Reactive[T] with Subscription

    Filters events from this reactive value using a specified predicate p.

    Filters events from this reactive value using a specified predicate p.

    Only events from this for which p returns true are emitted on the resulting reactive.

    p

    the predicate used to filter events

    returns

    a subscription and a reactive with the filtered events

    Definition Classes
    Reactive
  25. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def foreach(f: (T) ⇒ Unit): Reactive[Unit] with Subscription

    Executes the specified function every time an event arrives.

    Executes the specified function every time an event arrives.

    Semantically equivalent to onEvent, but supports for-loop syntax with reactive values.

    for (event <- r) println("Event arrived: " + event)
    f

    the callback invoked when an event arrives

    returns

    a subscription that is also a reactive value producing Unit events after each callback invocation

    Definition Classes
    Reactive
  27. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Signal[T] to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  28. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  31. def isSignal: Boolean

    Checks if this reactive value is also a signal.

    Checks if this reactive value is also a signal.

    returns

    true if the reactive value is a signal, false otherwise

    Definition Classes
    Reactive
  32. def map[S](f: (T) ⇒ S): Signal[S] with Subscription

    Maps the signal using the specified mapping function f.

    Maps the signal using the specified mapping function f.

    time ---------------->
    this --1---2----3--4->
    map  --2---4----6--8->
    S

    type of the mapped signal

    f

    mapping function for the events in this signal

    returns

    a subscription and a signal with the mapped events

    Definition Classes
    SignalReactive
  33. def mutate[M <: ReactMutable](m1: M, m2: M, mr: M*)(mutation: (T) ⇒ Unit): Subscription

    Mutates multiple reactive mutables m1, m2 and mr each time this reactive value produces an event.

    Mutates multiple reactive mutables m1, m2 and mr each time this reactive value produces an event.

    This version of the mutate works on multiple reactive values.

    M

    the type of the reactive mutable value

    m1

    the first mutable

    m2

    the second mutable

    mr

    the rest of the mutables

    mutation

    the function that modifies the mutables

    returns

    a subscription used to cancel this mutation

    Definition Classes
    Reactive
  34. def mutate[M <: ReactMutable](mutable: M)(mutation: (T) ⇒ Unit): Subscription

    Mutates the target reactive mutable called mutable each time this reactive value produces an event.

    Mutates the target reactive mutable called mutable each time this reactive value produces an event.

    One type of a reactive mutable is a mutable signal (Signal.Mutable), which is a wrapper for regular mutable objects. Here is an example, given a reactive of type r:

    val eventLog = Signal.Mutable(mutable.Buffer[String]())
    val eventLogMutations = r.mutate(eventLog) { event =>
      eventLog() += "at " + System.nanoTime + ": " + event
    } // <-- eventLog event propagated

    Whenever an event arrives on r, an entry is added to the buffer underlying eventLog. After the mutation completes, a modification event is produced by the eventLog and can be used subsequently:

    val uiUpdates = eventLog onEvent { b =>
    eventListWidget.add(b.last)
    }

    Use case:

    def mutate(mutable: ReactMutable)(mutation: T => Unit): Reactive.Subscription
    M

    the type of the reactive mutable value

    mutable

    the target mutable to be mutated with events from this stream

    mutation

    the function that modifies mutable given an event of type T

    returns

    a subscription used to cancel this mutation

    Definition Classes
    Reactive
    Note

    No two events will ever be concurrently processed by different threads on the same reactive mutable, but an event that is propagated from within the mutation can trigger an event on this. The result is that mutation is invoked concurrently on the same thread. The following code is problematic has a feedback loop in the dataflow graph:

    val emitter = new Reactive.Emitter[Int]
    val cell = ReactCell(0) // type of ReactMutable
    emitter.mutate(cell) { n =>
      cell := n
      if (n == 0)
        emitter += n + 1 // <-- event propagated
      assert(cell() == n)
    }
    emitter += 0

    The statement emitter += n + 1 in the mutate block suspends the current mutation, calls the mutation recursively and changes the value of cell, and the assertion fails when the first mutation resumes.

    Care must be taken to avoid mutation from emitting events that have feedback loops.

  35. def mux[S]()(implicit evidence: <:<[T, Reactive[S]]): Reactive[S]

    Returns events from the last reactive value that this emitted as an event of its own, in effect multiplexing the nested reactives.

    Returns events from the last reactive value that this emitted as an event of its own, in effect multiplexing the nested reactives.

    The resulting reactive only emits events from the reactive value last emitted by this, the preceding reactive values are ignored.

    This combinator is only available if this reactive value emits events that are themselves reactive values.

    Example:

    val currentReactive = new Reactive.Emitter[Reactive[Int]]
    val e1 = new Reactive.Emitter[Int]
    val e2 = new Reactive.Emitter[Int]
    val currentEvent = currentReactive.mux()
    val prints = currentEvent.onEvent(println)
    
    currentReactive += e1
    e2 += 1 // nothing is printed
    e1 += 2 // 2 is printed
    currentReactive += e2
    e2 += 6 // 6 is printed
    e1 += 7 // nothing is printed

    Shown on the diagram:

    time            ------------------->
    currentReactive --e1------e2------->
    e1              --------2----6----->
    e2              -----1----------7-->
    currentEvent    --------2----6----->

    Use case:

    def mux[S](): Reactive[S]
    S

    the type of the events in the nested reactive

    evidence

    an implicit evidence that this reactive is nested -- it emits events of type T that is actually a Reactive[S]

    returns

    a reactive of events from the reactive last emitted by this

    Definition Classes
    Reactive
  36. def muxSignal[S]()(implicit evidence: <:<[T, Signal[S]]): Signal[S] with Subscription

    Creates a signal that uses the current signal nested in this signal to compute the resulting value, in effect multiplexing the nested signals.

    Creates a signal that uses the current signal nested in this signal to compute the resulting value, in effect multiplexing the nested signals.

    Whenever the nested signal changes, or the value of the nested signal changes, an event with the current nested signal value is emitted and stored as the value of the resulting signal.

    Unreacts when both this and the last nested signal unreact.

    time      -------------------------------->
    this      1--2--3----4--5--6-------------->
                       0--0--0-----0---0--0--->
                                 1--2---4--8-->
    muxSignal 1--2--3--0--0--0---1--2---4--8-->

    This is similar to mux, but emits the initial value of the signal as an event too -- this is because mux does not require the nested reactive to be a signal.

    Use case:

    def muxSignal[S](): Signal[S]
    S

    type of the nested signal

    evidence

    evidence that the type of this signal T is a signal of type S

    returns

    a subscription and a signal with the multiplexed values.

  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  40. def on(reactor: ⇒ Unit): Subscription

    A shorthand for onReaction -- called whenever an event occurs.

    A shorthand for onReaction -- called whenever an event occurs.

    This method is handy when the precise event is not important, or the type of the event is Unit.

    reactor

    the callback invoked when an event arrives

    returns

    a subscription for unsubscribing from reactions

    Definition Classes
    Reactive
  41. def onCase(reactor: PartialFunction[T, Unit])(implicit sub: <:<[T, AnyRef]): Subscription

    A shorthand for onReaction -- the specified partial function is applied to only those events for which is defined.

    A shorthand for onReaction -- the specified partial function is applied to only those events for which is defined.

    This method only works for AnyRef values.

    Example:

    r onCase {
    case s: String => println(s)
    case n: Int    => println("number " + s)
    }

    Use case:

    def onCase(reactor: PartialFunction[T, Unit]): Reactive.Subscription
    reactor

    the callback for those events for which it is defined

    returns

    a subscription for unsubscribing from reactions

    Definition Classes
    Reactive
  42. def onEvent(reactor: (T) ⇒ Unit): Subscription

    A shorthand for onReaction -- the specified function is invoked whenever there is an event.

    A shorthand for onReaction -- the specified function is invoked whenever there is an event.

    reactor

    the callback for events

    returns

    a subcriptions for unsubscribing from reactions

    Definition Classes
    Reactive
  43. def onUnreact(reactor: ⇒ Unit): Subscription

    Executes the specified block when this reactive unreacts.

    Executes the specified block when this reactive unreacts.

    returns

    a subscription for the unreaction notification

    Definition Classes
    Reactive
  44. def past2(init: T): Signal[(T, T)] with Subscription

    Creates a new signal that emits tuples of the current and the last event emitted by this signal.

    Creates a new signal that emits tuples of the current and the last event emitted by this signal.

    time  ---------------------->
    this  1----2------3----4---->
    past2 i,1--1,2----2,3--3,4-->
    init

    the initial previous value, i in the diagram above

    returns

    a subscription and a signal of tuples of the current and last event

    Implicit information
    This member is added by an implicit conversion from Signal[T] to SignalOps[T] performed by method SignalOps in org.reactress.Signal.
    Definition Classes
    SignalOps
  45. def renewed: Signal[T] with Subscription

    A renewed instance of this signal emitting the same events, but having a different set of subscribers.

    A renewed instance of this signal emitting the same events, but having a different set of subscribers.

    time    ------------->
    this    --1----2--3-->
    renewed --1----2--3-->
    returns

    a subscription and a new instance of this signal

  46. def scanPast[S](z: S)(op: (S, T) ⇒ S): Signal[S] with Subscription

    Creates a new reactive s that produces events by consecutively applying the specified operator op to the previous event that s produced and the current event that this reactive value produced.

    Creates a new reactive s that produces events by consecutively applying the specified operator op to the previous event that s produced and the current event that this reactive value produced.

    The scanPast operation allows the current event from this reactive to be mapped into a different event by looking "into the past", i.e. at the event previously emitted by the resulting reactive.

    Example -- assume that a reactive value r produces events 1, 2 and 3. The following s:

    val s = r.scanPast(0)((sum, n) => sum + n)

    will produce events 1, 3 (1 + 2) and 6 (3 + 3). Note: the initial value 0 is not emitted.

    The scanPast can also be used to produce a reactive value of a different type: The following produces a complete history of all the events seen so far:

    val s2 = r.scanPast(List[Int]()) {
    (history, n) => n :: history
    }

    The s2 will produce events 1 :: Nil, 2 :: 1 :: Nil and 3 :: 2 :: 1 :: Nil. Note: the initial value Nil is not emitted.

    The resulting reactive value is not only a reactive value, but also a Signal, so the value of the previous event can be obtained by calling apply at any time.

    This operation is closely related to a scanLeft on a collection -- if a reactive value were a sequence of elements, then scanLeft would produce a new sequence whose elements correspond to the events of the resulting reactive.

    S

    the type of the events in the resulting reactive value

    z

    the initial value of the scan past

    op

    the operator the combines the last produced and the current event into a new one

    returns

    a subscription that is also a reactive value that scans events from this reactive value

    Definition Classes
    Reactive
  47. def scanPastNow(op: (T, T) ⇒ T): Signal[T] with Subscription

    Scans the events in the past of this signal starting from the current value of this signal.

    Scans the events in the past of this signal starting from the current value of this signal.

    time        -------------------->
    this        1--2----4-----8----->
    scanPastNow 1--3----7-----15---->
    Implicit information
    This member is added by an implicit conversion from Signal[T] to SignalOps[T] performed by method SignalOps in org.reactress.Signal.
    Definition Classes
    SignalOps
  48. def signal(init: T): Signal[T] with Subscription

    Given an initial event init, converts this reactive into a Signal.

    Given an initial event init, converts this reactive into a Signal.

    The resulting signal initially contains the event init, and subsequently any event that the this reactive produces.

    init

    an initial value for the signal

    returns

    the signal version of the current reactive

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
  49. def sync[S, R](that: Reactive[S])(f: (T, S) ⇒ R)(implicit at: Arrayable[T], as: Arrayable[S], b: CanBeBuffered): Reactive[R] with Subscription

    Syncs the arrival of events from this and that reactive value.

    Syncs the arrival of events from this and that reactive value.

    Ensures that pairs of events from this reactive value and that reactive value are emitted together. If the events produced in time by this and that, the sync will be as follows:

    time   --------------------------->
    this   ----1---------2-------4---->
    that   --1-----2--3--------------->
    sync   ----1,1-------2,2-----4,3-->

    Pairs of events produced from this and that are then transformed using specified function f. For example, clients that want to output tuples do:

    val synced = (a sync b) { (a, b) => (a, b) }

    Clients that, for example, want to create differences in pairs of events do:

    val diffs = (a sync b)(_ - _)

    The resulting reactive unreacts either when this unreacts and there are no more buffered events from this, or when that unreacts and there are no more buffered events from that.

    Use case:

    def sync[S, R](that: Reactive[S])(f: (T, S) => R): Reactive[R]
    S

    the type of the events in that reactive

    R

    the type of the events in the resulting reactive

    that

    the reactive to sync with

    f

    the mapping function for the pair of events

    at

    evidence that arrays can be created for the type T

    as

    evidence that arrays can be created for the type S

    b

    evidence that the client allows events to be buffered

    returns

    a subscription and the reactive with the resulting events

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
    Note

    This operation potentially caches events from this and that. Unless certain that both this produces a bounded number of events before the that produces an event, and vice versa, this operation should not be called. To enforce this, clients must import the CanBeBuffered evidence explicitly into the scope in which they call sync.

  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. def union[S]()(implicit evidence: <:<[T, Reactive[S]]): Reactive[S] with Subscription

    Unifies the events produced by all the reactives emitted by this.

    Unifies the events produced by all the reactives emitted by this.

    This operation is only available for reactive values that emit other reactives as events. The resulting reactive unifies events of all the reactives emitted by this. Once this and all the reactives emitted by this unreact, the resulting reactive terminates.

    Example:

    time  -------------------------->
    this     --1----2--------3------>
                 ---------5----6---->
                   ---4----------7-->
    union -----1----2-4---5--3-6-7-->

    Use case:

    def union[S](): Reactive[S]
    S

    the type of the events in reactives emitted by this

    evidence

    evidence that events of type T produced by this are actually reactive values of type S

    returns

    a subscription and the reactive with the union of all the events

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
  53. def union(that: Reactive[T]): Reactive[T] with Subscription

    Creates a union of this and that reactive.

    Creates a union of this and that reactive.

    The resulting reactive value emits events from both this and that reactive. It unreacts when both this and that reactive unreact.

    that

    another reactive value for the union

    returns

    a subscription and the reactive value with unified events from this and that

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Definition Classes
    ReactiveOps
  54. def until[S](that: Reactive[S]): Reactive[T] with Subscription

    Creates a new reactive value that produces events from this reactive value until that produces an event.

    Creates a new reactive value that produces events from this reactive value until that produces an event.

    If this unreacts before that produces a value, the resulting reactive unreacts. Otherwise, the resulting reactive unreacts whenever that produces a value.

    S

    the type of that reactive

    that

    the reactive until whose first event the result propagates events

    returns

    a subscription and the resulting reactive that emits only until that emits

    Definition Classes
    Reactive
  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def zip[S, R](that: Signal[S])(f: (T, S) ⇒ R): Signal[R] with Subscription

    Zips values of this and that signal using the specified function f.

    Zips values of this and that signal using the specified function f.

    Whenever either of the two signals change the resulting signal also changes. When this emits an event, the current value of that is used to produce a signal on that, and vice versa.

    time --------------------------------->
    this --1----2-----4----------8-------->
    that --a----------------b---------c--->
    zip  --1,a--2,a---4,a---4,b--8,b--8,c->

    The resulting tuple of events from this and that is mapped using the user-specified mapping function f. For example, to produce tuples:

    val tuples = (a zip b) { (a, b) => (a, b) }

    To produce the difference between two integer signals:

    val differences = (a zip b)(_ - _)

    Note:: clients looking into pairing incoming events from two signals you should use the sync method inherited from Reactive.

    S

    the type of that signal

    R

    the type of the resulting signal

    that

    the signal to zip this with

    f

    the function that maps a tuple of values into an outgoing event

    returns

    a subscription and the reactive that emits zipped events

  59. def [B](y: B): (Signal[T], B)

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ArrowAssoc[Signal[T]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Reactive[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ReactiveOps[T] performed by method ReactiveOps in org.reactress.Reactive.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (signal: ReactiveOps[T]).self
    Definition Classes
    ReactiveOps
  2. val self: Signal[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to SignalOps[T] performed by method SignalOps in org.reactress.Signal.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (signal: SignalOps[T]).self
    Definition Classes
    SignalOps
  3. val self: Any

    Implicit information
    This member is added by an implicit conversion from Signal[T] to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (signal: StringAdd).self
    Definition Classes
    StringAdd
  4. val self: Any

    Implicit information
    This member is added by an implicit conversion from Signal[T] to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (signal: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Signal[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to ArrowAssoc[Signal[T]] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (signal: ArrowAssoc[Signal[T]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Signal[T]

    Implicit information
    This member is added by an implicit conversion from Signal[T] to Ensuring[Signal[T]] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (signal: Ensuring[Signal[T]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Reactive[T]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion ReactiveOps from Signal[T] to ReactiveOps[T]

Inherited by implicit conversion SignalOps from Signal[T] to SignalOps[T]

Inherited by implicit conversion any2stringadd from Signal[T] to StringAdd

Inherited by implicit conversion any2stringfmt from Signal[T] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Signal[T] to ArrowAssoc[Signal[T]]

Inherited by implicit conversion any2Ensuring from Signal[T] to Ensuring[Signal[T]]

Ungrouped