com.noheltcj.rxcommon.observers.AbstractObserver.kt Maven / Gradle / Ivy
package com.noheltcj.rxcommon.observers
abstract class AbstractObserver(val doOnNext: (E) -> Unit = {},
val doOnError: (Throwable) -> Unit = {},
val doOnComplete: () -> Unit = {}) : Observer {
override fun onNext(value: E) {
doOnNext(value)
}
override fun onError(throwable: Throwable) {
doOnError(throwable)
}
override fun onComplete() {
doOnComplete()
}
}