Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
src
README.md
build.gradle

README.md

Kotlin Adaptor for RxJava

Kotlin has support for SAM (Single Abstract Method) Interfaces as Functions (i.e. Java 8 Lambdas). So you could use Kotlin in RxJava whitout this adaptor

Observable.create<String>{ observer ->
    observer!!.onNext("Hello")
    observer.onCompleted()
    Subscriptions.empty()
}!!.subscribe { result ->
    a!!.received(result)
}

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

import rx.lang.kotlin.*

{(observer: Observer<in String>) ->
    observer.onNext("Hello")
    observer.onCompleted()
    Subscriptions.empty()!!
}.asObservable().subscribe { result ->
    a!!.received(result)
}

Binaries

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

Example for Maven:

<dependency>
    <groupId>com.netflix.rxjava</groupId>
    <artifactId>rxjava-kotlin</artifactId>
    <version>x.y.z</version>
</dependency>

and for Ivy:

<dependency org="com.netflix.rxjava" name="rxjava-kotlin" rev="x.y.z" />

and for Gradle:

compile 'com.netflix.rxjava:rxjava-kotlin:x.y.z'
Something went wrong with that request. Please try again.