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

com.noheltcj.rxcommon.operators.Operator.kt Maven / Gradle / Ivy

package com.noheltcj.rxcommon.operators

import com.noheltcj.rxcommon.Source
import com.noheltcj.rxcommon.emitters.Emitter
import com.noheltcj.rxcommon.observers.Observer

abstract class Operator : Source, Observer {
  abstract val emitter: Emitter

  override fun onNext(value: E) {
    emitter.next(value)
  }

  override fun onError(throwable: Throwable) {
    emitter.terminate(throwable)
  }

  override fun onComplete() {
    emitter.complete()
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy