All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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()
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy