TeeObserver

class TeeObserver[T](observers: Seq[Observer[T]]) extends Observer[T]
trait Observer[T]
trait Named
trait Sink[T]
class Object
trait Matchable
class Any

Value members

Concrete methods

override def onError(err: Throwable): Unit

Note: must not throw!

Note: must not throw!

Definition Classes
Observer
override def onNext(nextValue: T): Unit

Note: must not throw!

Note: must not throw!

Definition Classes
Observer
override def onTry(nextValue: Try[T]): Unit

Note: must not throw!

Note: must not throw!

Definition Classes
Observer

Inherited methods

def contracollect[B](pf: PartialFunction[B, T]): Observer[B]

Like contramap but with collect semantics: not calling the original observer when pf is not defined

Like contramap but with collect semantics: not calling the original observer when pf is not defined

Value parameters:
pf

Note: guarded against exceptions

Inherited from:
Observer
def contramap[B](project: B => T): Observer[B]

Creates another Observer such that calling its onNext will call this observer's onNext with the value processed by the project function.

Creates another Observer such that calling its onNext will call this observer's onNext with the value processed by the project function.

This is useful when you need to pass down an Observer[A] to a child component which should not know anything about the type A, but both child and parent know about type B, and the parent knows how to translate B into A.

Value parameters:
project

Note: guarded against exceptions

Inherited from:
Observer
def contramapOpt[B](project: B => Option[T]): Observer[B]

Like contramap, but original observer only fires if project returns Some(value)

Like contramap, but original observer only fires if project returns Some(value)

So, similar to contracollect but optimized for APIs like NonEmptyList.fromList that return an Option.

Value parameters:
project

Note: guarded against exceptions

Inherited from:
Observer
def contramapSome[V](implicit evidence: Option[V] <:< T): Observer[V]

Available only on Observers of Option, this is a shortcut for contramapB

Available only on Observers of Option, this is a shortcut for contramapB

Inherited from:
Observer
def contramapTry[B](project: Try[B] => Try[T]): Observer[B]
Value parameters:
project

must not throw!

Inherited from:
Observer
protected def defaultDisplayName: String

This is the method that subclasses override to preserve the user's ability to set custom display names.

This is the method that subclasses override to preserve the user's ability to set custom display names.

Inherited from:
Named
def delay(ms: Int): Observer[A]

Creates another Observer such that calling it calls the original observer after the specified delay.

Creates another Observer such that calling it calls the original observer after the specified delay.

Inherited from:
Observer
final def displayName: String
Inherited from:
Named
def filter[B <: T](passes: B => Boolean): Observer[B]

Creates another Observer such that calling its onNext will call this observer's onNext with the same value, but only if it passes the test.

Creates another Observer such that calling its onNext will call this observer's onNext with the same value, but only if it passes the test.

Value parameters:
passes

Note: guarded against exceptions

Inherited from:
Observer
def setDisplayName(name: String): Named.this.type

Set the display name for this instance (observable or observer).

Set the display name for this instance (observable or observer).

  • This method modifies the instance and returns this. It does not create a new instance.
  • New name you set will override the previous name, if any. This might change in the future. For the sake of sanity, don't call this more than once for the same instance.
  • If display name is set, toString will output it instead of the standard type@hashcode string
Inherited from:
Named
override def toObserver: Observer[A]
Definition Classes
Observer -> Sink
Inherited from:
Observer
final override def toString: String

Override defaultDisplayName instead of this, if you need to.

Override defaultDisplayName instead of this, if you need to.

Definition Classes
Named -> Any
Inherited from:
Named

Inherited fields

lazy val toJsFn1: Function1[T, Unit]
Inherited from:
Observer