ScalaObservable

final implicit
class ScalaObservable[T](val underlying: Observable[T]) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

@inline
def fold[R](z: R)(op: (R, T) => R): Observable[R]

we not named foldLeft to indicate that Observable may emit items "out of order" (not like Future) Ex: Observable.from(2, 1).flatMap(Observable.timer(_ seconds)).fold("")(_ + _) is Observable of "12" (not "21")

we not named foldLeft to indicate that Observable may emit items "out of order" (not like Future) Ex: Observable.from(2, 1).flatMap(Observable.timer(_ seconds)).fold("")(_ + _) is Observable of "12" (not "21")

Note

result may "out of order"

@inline
def scConcatMap[R](f: T => Observable[R]): Observable[R]

scala concatMap. We can't name concatMap because scala compiler will not implicitly pick this method.

scala concatMap. We can't name concatMap because scala compiler will not implicitly pick this method.

Note

If don't need in-order then you should use scFlatMap

@inline
def scFlatMap[R](f: T => Observable[R]): Observable[R]

scala flatMap. We can't name flatMap because scala compiler will not implicitly pick this method.

scala flatMap. We can't name flatMap because scala compiler will not implicitly pick this method.

Note

result may "out of order". If need in-order then you should use scConcatMap

@inline
def scMap[R](f: T => R): Observable[R]

scala map. We can't name map because scala compiler will not implicitly pick this method

scala map. We can't name map because scala compiler will not implicitly pick this method

def toFuture: Future[T]
Note

if underlying:

  • is empty then toFuture will fail with NoSuchElementException("Sequence contains no elements")
  • emit more than one values then toFuture will fail with IllegalArgumentException("Sequence contains too many elements")

Concrete fields

val underlying: Observable[T]