Class

com.raquo.airstream.eventstream

CombineEventStream2

Related Doc: package eventstream

Permalink

class CombineEventStream2[A, B, O] extends EventStream[O] with CombineObservable[O]

Stream that combines the latest values from two streams into a tuple. Only fires after both streams have sent a value.

Note: this stream forgets any previous values of parent streams once it's stopped

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CombineEventStream2
  2. CombineObservable
  3. SyncObservable
  4. EventStream
  5. LazyObservable
  6. Observable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CombineEventStream2(parent1: EventStream[A], parent2: EventStream[B], combinator: (A, B) ⇒ O)

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addInternalObserver(observer: InternalObserver[O]): Unit

    Permalink

    Child observable should call this method on this lazy observable when it was started.

    Child observable should call this method on this lazy observable when it was started. This lazy observable calls onStart if this action has given it its first observer (internal or external). See docs for Observable.onStart

    Attributes
    protected[com.raquo.airstream]
    Definition Classes
    LazyObservableObservable
  5. def addObserver(observer: Observer[O])(implicit owner: Owner): Subscription

    Permalink

    And an external observer

    And an external observer

    Definition Classes
    LazyObservableObservable
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def collect[B](pf: PartialFunction[O, B]): EventStream[B]

    Permalink
    Definition Classes
    EventStream
  9. def combineWith[AA >: O, B](otherEventStream: EventStream[B]): CombineEventStream2[AA, B, (AA, B)]

    Permalink
    Definition Classes
    EventStream
  10. def compose[B](operator: (EventStream[O]) ⇒ EventStream[B]): EventStream[B]

    Permalink
    Definition Classes
    EventStream
  11. def debounce(delayFromLastEventMillis: Int): EventStream[O]

    Permalink
    Definition Classes
    EventStream
  12. def delay(intervalMillis: Int = 0): EventStream[O]

    Permalink
    Definition Classes
    EventStream
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. lazy val externalObservers: Array[Observer[O]]

    Permalink

    Note: Observer can be added more than once to an Observable.

    Note: Observer can be added more than once to an Observable. If so, it will observe each event as many times as it was added.

    Attributes
    protected[this]
    Definition Classes
    Observable
  16. def filter(passes: (O) ⇒ Boolean): EventStream[O]

    Permalink
    Definition Classes
    EventStream
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def fire(nextValue: O, transaction: Transaction): Unit

    Permalink
    Attributes
    protected[this]
    Definition Classes
    CombineObservableObservable
  19. def flatten[B](implicit evidence: <:<[Observable[O], Observable[EventStream[B]]]): EventStream[B]

    Permalink
    Definition Classes
    Observable
  20. def fold[B](initial: B)(fn: (B, O) ⇒ B): Signal[B]

    Permalink
    Definition Classes
    EventStream
  21. def foreach(onNext: (O) ⇒ Unit)(implicit owner: Owner): Subscription

    Permalink
    Definition Classes
    Observable
  22. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  24. val id: Int

    Permalink
    Definition Classes
    Observable
  25. val internalObserver: InternalObserver[O]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    CombineObservable
  26. val internalObservers: Array[InternalObserver[O]]

    Permalink

    Note: This is enforced to be a Set outside of the type system #performance

    Note: This is enforced to be a Set outside of the type system #performance

    Attributes
    protected[this]
    Definition Classes
    Observable
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def isStarted: Boolean

    Permalink
    Attributes
    protected[this]
    Definition Classes
    LazyObservable
  29. def map[B](project: (O) ⇒ B): EventStream[B]

    Permalink

    Basic idea: Lazy Observable only holds references to those children that have any observers (either directly on themselves, or on any of their descendants).

    Basic idea: Lazy Observable only holds references to those children that have any observers (either directly on themselves, or on any of their descendants). What this achieves: - Stream only propagates its value to children that (directly or not) have observers - Stream calculates its value only once regardless of how many observers / children it has) (so, all streams are "hot" observables) - Stream doesn't hold references to Streams that no one observes, allowing those Streams to be garbage collected if they are otherwise unreachable (which they should become when their subscriptions are killed by their owners)

    Definition Classes
    EventStreamLazyObservable
  30. def mapTo[B](value: B): EventStream[B]

    Permalink
    Definition Classes
    EventStream
  31. var maybeCombinedValue: Option[O]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    CombineObservable
  32. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  35. def onStart(): Unit

    Permalink

    This method is fired when this observable starts working (listening for parent events and/or firing its own events)

    This method is fired when this observable starts working (listening for parent events and/or firing its own events)

    The above semantic is universal, but different observables fit onStart differently in their lifecycle: - State is an eager observable, it calls onStart on initialization. - LazyObservable (Stream or Signal) calls onStart when it gets its first observer (internal or external)

    So, a State observable calls onStart only once in its existence, whereas a LazyObservable calls it potentially multiple times, the second time being after it has stopped (see onStop).

    Attributes
    protected[this]
    Definition Classes
    CombineObservableObservable
  36. def onStop(): Unit

    Permalink

    This method is fired when this observable stops working (listening for parent events and/or firing its own events)

    This method is fired when this observable stops working (listening for parent events and/or firing its own events)

    The above semantic is universal, but different observables fit onStop differently in their lifecycle: - State is an eager, Owned observable. It calls onStop when its Owner decides to State.kill it - LazyObservable (Stream or Signal) calls onStop when it loses its last observer (internal or external)

    So, a State observable calls onStop only once in its existence. After that, the observable is disabled and will never start working again. On the other hand, a LazyObservable calls onStop potentially multiple times, the second time being after it has started again (see onStart).

    Attributes
    protected[this]
    Definition Classes
    CombineEventStream2CombineObservableObservable
  37. val parentObservers: Array[InternalParentObserver[_]]

    Permalink

    Parent observers are not immediately active.

    Parent observers are not immediately active. onStart/onStop regulates that.

    Attributes
    protected[this]
    Definition Classes
    CombineObservable
  38. def removeExternalObserverNow(observer: Observer[O]): Boolean

    Permalink

    returns

    whether observer was removed (false if it wasn't subscribed to this observable)

    Attributes
    protected[com.raquo.airstream]
    Definition Classes
    LazyObservableObservable
  39. def removeInternalObserverNow(observer: InternalObserver[O]): Boolean

    Permalink

    Child observable should call this method on this lazy observable when it was stopped.

    Child observable should call this method on this lazy observable when it was stopped. This lazy observable calls onStop if this action has removed its last observer (internal or external). See also docs for Observable.onStop

    Attributes
    protected[com.raquo.airstream]
    Definition Classes
    LazyObservableObservable
  40. def removeObserver(observer: Observer[O]): Unit

    Permalink

    Schedule an external observer to be removed in the next transaction.

    Schedule an external observer to be removed in the next transaction. This will still happen synchronously, but will not interfere with iteration over the observables' lists of observers during the current transaction.

    Note: To completely disconnect an Observer from this Observable, you need to remove it as many times as you added it to this Observable.

    Definition Classes
    Observable
    Annotations
    @inline()
  41. def sample[B](memoryObservable: MemoryObservable[B]): EventStream[B]

    Permalink
    Definition Classes
    EventStream
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  43. def throttle(intervalMillis: Int): EventStream[O]

    Permalink
    Definition Classes
    EventStream
  44. def toLazy: CombineEventStream2.this.type

    Permalink

    Get a lazy observable that emits the same values as this one (assuming it has observers, as usual)

    Get a lazy observable that emits the same values as this one (assuming it has observers, as usual)

    This is useful when you want to map over an Observable of an unknown type.

    Note: Observable itself has no "map" method because mapping over State without expecting / accounting for State's eagerness can result in memory leaks. See README.

    Definition Classes
    LazyObservableObservable
  45. def toSignal[B >: O](initial: B): Signal[B]

    Permalink
    Definition Classes
    EventStream
  46. def toState[B >: O](initial: B)(implicit owner: Owner): State[B]

    Permalink
    Definition Classes
    EventStream
  47. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  48. def toWeakSignal: Signal[Option[O]]

    Permalink
    Definition Classes
    EventStream
  49. val topoRank: Int

    Permalink
    Attributes
    protected[com.raquo.airstream]
    Definition Classes
    CombineEventStream2Observable
  50. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def withCurrentValueOf[B](memoryObservable: MemoryObservable[B]): EventStream[(O, B)]

    Permalink
    Definition Classes
    EventStream

Inherited from CombineObservable[O]

Inherited from SyncObservable[O]

Inherited from EventStream[O]

Inherited from LazyObservable[O]

Inherited from Observable[O]

Inherited from AnyRef

Inherited from Any

Ungrouped