Skip to content

kynexiao9053/RxKotlin

 
 

Repository files navigation

Kotlin Adaptor for RxJava

This adaptor exposes a set of Extension functions that allow a more idiomatic Kotlin usage

    observable<String> { subscriber ->
        subscriber.onNext("H")
        subscriber.onNext("e")
        subscriber.onNext("l")
        subscriber.onNext("")
        subscriber.onNext("l")
        subscriber.onNext("o")
        subscriber.onCompleted()
    }.filter { it.isNotEmpty() }
    .fold (StringBuilder()) { sb, e -> sb.append(e) }
    .map { it.toString() }
    .subscribe { a.received(it) }

    verify(a, times(1)).received("Hello")

Build

Build Status

Binaries

Binaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org.

Example for Maven:

<dependency>
    <groupId>io.reactivex</groupId>
    <artifactId>rxkotlin</artifactId>
    <version>x.y.z</version>
</dependency>

and for Ivy:

<dependency org="io.reactivex" name="rxkotlin" rev="x.y.z" />

and for Gradle:

compile 'io.reactivex:rxkotlin:x.y.z'

About

RxJava bindings for Kotlin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 97.6%
  • Shell 2.4%