com.aol.cyclops.rx.hkt.ObservableKind Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cyclops-rx Show documentation
Show all versions of cyclops-rx Show documentation
Converters and Comprehenders for RxJava
package com.aol.cyclops.rx.hkt;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import com.aol.cyclops2.hkt.Higher;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import cyclops.companion.rx.Observables;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import rx.BackpressureOverflow.Strategy;
import rx.Completable;
import rx.Notification;
import rx.Observable;
import rx.Observable.OnSubscribe;
import rx.Observable.Operator;
import rx.Observable.Transformer;
import rx.Observer;
import rx.Scheduler;
import rx.Single;
import rx.Subscription;
import rx.functions.Action0;
import rx.functions.Action1;
import rx.functions.Action2;
import rx.functions.Func0;
import rx.functions.Func1;
import rx.functions.Func2;
import rx.observables.BlockingObservable;
import rx.observables.ConnectableObservable;
import rx.observables.GroupedObservable;
import rx.schedulers.TimeInterval;
import rx.schedulers.Timestamped;
/**
* Simulates Higher Kinded Types for Reactor Observable's
*
* ObservableKind is a Observable and a Higher Kinded Type (ObservableKind.µ,T)
*
* @author johnmcclean
*
* @param Data type stored within the Observable
*/
@AllArgsConstructor(access = AccessLevel.PRIVATE)
public final class ObservableKind implements Higher, Publisher {
/**
* Witness type
*
* @author johnmcclean
*
*/
public static class µ {
}
/**
* Construct a HKT encoded completed Observable
*
* @param value To encode inside a HKT encoded Observable
* @return Completed HKT encoded FObservable
*/
public static ObservableKind just(T value) {
return widen(Observable.just(value));
}
public static ObservableKind just(T... values) {
return widen(Observable.from(values));
}
public static ObservableKind empty() {
return widen(Observable.empty());
}
/**
* Convert a Observable to a simulated HigherKindedType that captures Observable nature
* and Observable element data type separately. Recover via @see ObservableKind#narrow
*
* If the supplied Observable implements ObservableKind it is returned already, otherwise it
* is wrapped into a Observable implementation that does implement ObservableKind
*
* @param observable Observable to widen to a ObservableKind
* @return ObservableKind encoding HKT info about Observables
*/
public static ObservableKind widen(final Observable observable) {
return new ObservableKind(
observable);
}
/**
* Widen a ObservableKind nested inside another HKT encoded type
*
* @param flux HTK encoded type containing a Observable to widen
* @return HKT encoded type with a widened Observable
*/
public static Higher> widen2(Higher> flux) {
// a functor could be used (if C2 is a functor / one exists for C2 type)
// instead of casting
// cast seems safer as Higher must be a StreamType
return (Higher) flux;
}
public static ObservableKind widen(final Publisher completableObservable) {
return new ObservableKind(
Observables.observable(completableObservable));
}
/**
* Convert the raw Higher Kinded Type for ObservableKind types into the ObservableKind type definition class
*
* @param future HKT encoded list into a ObservableKind
* @return ObservableKind
*/
public static ObservableKind narrowK(final Higher future) {
return (ObservableKind) future;
}
/**
* Convert the HigherKindedType definition for a Observable into
*
* @param observable Type Constructor to convert back into narrowed type
* @return Observable from Higher Kinded Type
*/
public static Observable narrow(final Higher observable) {
return ((ObservableKind) observable).narrow();
}
private final Observable boxed;
/**
* @return wrapped Obsverable
*/
public Observable narrow() {
return boxed;
}
@Override
public void subscribe(Subscriber super T> s) {
Observables.publisher(boxed)
.subscribe(s);
}
/**
* @return
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return boxed.hashCode();
}
/**
* @param obj
* @return
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object obj) {
return boxed.equals(obj);
}
/**
* @param conversion
* @return
* @see rx.Observable#extend(rx.functions.Func1)
*/
public R extend(Func1 super OnSubscribe, ? extends R> conversion) {
return boxed.extend(conversion);
}
/**
* @return
* @see java.lang.Object#toString()
*/
public String toString() {
return boxed.toString();
}
/**
* @param operator
* @return
* @see rx.Observable#lift(rx.Observable.Operator)
*/
public final Observable lift(Operator extends R, ? super T> operator) {
return boxed.lift(operator);
}
/**
* @param transformer
* @return
* @see rx.Observable#compose(rx.Observable.Transformer)
*/
public Observable compose(Transformer super T, ? extends R> transformer) {
return boxed.compose(transformer);
}
/**
* @return
* @see rx.Observable#toSingle()
*/
public Single toSingle() {
return boxed.toSingle();
}
/**
* @return
* @see rx.Observable#toCompletable()
*/
public Completable toCompletable() {
return boxed.toCompletable();
}
/**
* @return
* @see rx.Observable#nest()
*/
public final Observable> nest() {
return boxed.nest();
}
/**
* @param predicate
* @return
* @see rx.Observable#all(rx.functions.Func1)
*/
public final Observable all(Func1 super T, Boolean> predicate) {
return boxed.all(predicate);
}
/**
* @param t1
* @return
* @see rx.Observable#ambWith(rx.Observable)
*/
public final Observable ambWith(Observable extends T> t1) {
return boxed.ambWith(t1);
}
/**
* @return
* @see rx.Observable#asObservable()
*/
public final Observable asObservable() {
return boxed.asObservable();
}
/**
* @param bufferClosingSelector
* @return
* @see rx.Observable#buffer(rx.functions.Func0)
*/
public final Observable> buffer(
Func0 extends Observable extends TClosing>> bufferClosingSelector) {
return boxed.buffer(bufferClosingSelector);
}
/**
* @param count
* @return
* @see rx.Observable#buffer(int)
*/
public final Observable> buffer(int count) {
return boxed.buffer(count);
}
/**
* @param count
* @param skip
* @return
* @see rx.Observable#buffer(int, int)
*/
public final Observable> buffer(int count, int skip) {
return boxed.buffer(count, skip);
}
/**
* @param timespan
* @param timeshift
* @param unit
* @return
* @see rx.Observable#buffer(long, long, java.util.concurrent.TimeUnit)
*/
public final Observable> buffer(long timespan, long timeshift, TimeUnit unit) {
return boxed.buffer(timespan, timeshift, unit);
}
/**
* @param timespan
* @param timeshift
* @param unit
* @param scheduler
* @return
* @see rx.Observable#buffer(long, long, java.util.concurrent.TimeUnit, rx.Scheduler)
*/
public final Observable> buffer(long timespan, long timeshift, TimeUnit unit, Scheduler scheduler) {
return boxed.buffer(timespan, timeshift, unit, scheduler);
}
/**
* @param timespan
* @param unit
* @return
* @see rx.Observable#buffer(long, java.util.concurrent.TimeUnit)
*/
public final Observable> buffer(long timespan, TimeUnit unit) {
return boxed.buffer(timespan, unit);
}
/**
* @param timespan
* @param unit
* @param count
* @return
* @see rx.Observable#buffer(long, java.util.concurrent.TimeUnit, int)
*/
public final Observable> buffer(long timespan, TimeUnit unit, int count) {
return boxed.buffer(timespan, unit, count);
}
/**
* @param timespan
* @param unit
* @param count
* @param scheduler
* @return
* @see rx.Observable#buffer(long, java.util.concurrent.TimeUnit, int, rx.Scheduler)
*/
public final Observable> buffer(long timespan, TimeUnit unit, int count, Scheduler scheduler) {
return boxed.buffer(timespan, unit, count, scheduler);
}
/**
* @param timespan
* @param unit
* @param scheduler
* @return
* @see rx.Observable#buffer(long, java.util.concurrent.TimeUnit, rx.Scheduler)
*/
public final Observable> buffer(long timespan, TimeUnit unit, Scheduler scheduler) {
return boxed.buffer(timespan, unit, scheduler);
}
/**
* @param bufferOpenings
* @param bufferClosingSelector
* @return
* @see rx.Observable#buffer(rx.Observable, rx.functions.Func1)
*/
public final Observable> buffer(Observable extends TOpening> bufferOpenings,
Func1 super TOpening, ? extends Observable extends TClosing>> bufferClosingSelector) {
return boxed.buffer(bufferOpenings, bufferClosingSelector);
}
/**
* @param boundary
* @return
* @see rx.Observable#buffer(rx.Observable)
*/
public final Observable> buffer(Observable boundary) {
return boxed.buffer(boundary);
}
/**
* @param boundary
* @param initialCapacity
* @return
* @see rx.Observable#buffer(rx.Observable, int)
*/
public final Observable> buffer(Observable boundary, int initialCapacity) {
return boxed.buffer(boundary, initialCapacity);
}
/**
* @return
* @see rx.Observable#cache()
*/
public final Observable cache() {
return boxed.cache();
}
/**
* @param initialCapacity
* @return
* @deprecated
* @see rx.Observable#cache(int)
*/
public final Observable cache(int initialCapacity) {
return boxed.cache(initialCapacity);
}
/**
* @param initialCapacity
* @return
* @see rx.Observable#cacheWithInitialCapacity(int)
*/
public final Observable cacheWithInitialCapacity(int initialCapacity) {
return boxed.cacheWithInitialCapacity(initialCapacity);
}
/**
* @param klass
* @return
* @see rx.Observable#cast(java.lang.Class)
*/
public final Observable cast(Class klass) {
return boxed.cast(klass);
}
/**
* @param stateFactory
* @param collector
* @return
* @see rx.Observable#collect(rx.functions.Func0, rx.functions.Action2)
*/
public final Observable collect(Func0 stateFactory, Action2 collector) {
return boxed.collect(stateFactory, collector);
}
/**
* @param func
* @return
* @see rx.Observable#concatMap(rx.functions.Func1)
*/
public final Observable concatMap(Func1 super T, ? extends Observable extends R>> func) {
return boxed.concatMap(func);
}
/**
* @param func
* @return
* @see rx.Observable#concatMapDelayError(rx.functions.Func1)
*/
public final Observable concatMapDelayError(Func1 super T, ? extends Observable extends R>> func) {
return boxed.concatMapDelayError(func);
}
/**
* @param collectionSelector
* @return
* @see rx.Observable#concatMapIterable(rx.functions.Func1)
*/
public final Observable concatMapIterable(
Func1 super T, ? extends Iterable extends R>> collectionSelector) {
return boxed.concatMapIterable(collectionSelector);
}
/**
* @param t1
* @return
* @see rx.Observable#concatWith(rx.Observable)
*/
public final Observable concatWith(Observable extends T> t1) {
return boxed.concatWith(t1);
}
/**
* @param element
* @return
* @see rx.Observable#contains(java.lang.Object)
*/
public final Observable contains(Object element) {
return boxed.contains(element);
}
/**
* @return
* @see rx.Observable#count()
*/
public final Observable count() {
return boxed.count();
}
/**
* @return
* @see rx.Observable#countLong()
*/
public final Observable countLong() {
return boxed.countLong();
}
/**
* @param debounceSelector
* @return
* @see rx.Observable#debounce(rx.functions.Func1)
*/
public final Observable debounce(Func1 super T, ? extends Observable> debounceSelector) {
return boxed.debounce(debounceSelector);
}
/**
* @param timeout
* @param unit
* @return
* @see rx.Observable#debounce(long, java.util.concurrent.TimeUnit)
*/
public final Observable debounce(long timeout, TimeUnit unit) {
return boxed.debounce(timeout, unit);
}
/**
* @param timeout
* @param unit
* @param scheduler
* @return
* @see rx.Observable#debounce(long, java.util.concurrent.TimeUnit, rx.Scheduler)
*/
public final Observable debounce(long timeout, TimeUnit unit, Scheduler scheduler) {
return boxed.debounce(timeout, unit, scheduler);
}
/**
* @param defaultValue
* @return
* @see rx.Observable#defaultIfEmpty(java.lang.Object)
*/
public final Observable defaultIfEmpty(T defaultValue) {
return boxed.defaultIfEmpty(defaultValue);
}
/**
* @param alternate
* @return
* @see rx.Observable#switchIfEmpty(rx.Observable)
*/
public final Observable switchIfEmpty(Observable extends T> alternate) {
return boxed.switchIfEmpty(alternate);
}
/**
* @param subscriptionDelay
* @param itemDelay
* @return
* @see rx.Observable#delay(rx.functions.Func0, rx.functions.Func1)
*/
public final Observable delay(Func0 extends Observable> subscriptionDelay,
Func1 super T, ? extends Observable> itemDelay) {
return boxed.delay(subscriptionDelay, itemDelay);
}
/**
* @param itemDelay
* @return
* @see rx.Observable#delay(rx.functions.Func1)
*/
public final Observable delay(Func1 super T, ? extends Observable> itemDelay) {
return boxed.delay(itemDelay);
}
/**
* @param delay
* @param unit
* @return
* @see rx.Observable#delay(long, java.util.concurrent.TimeUnit)
*/
public final Observable delay(long delay, TimeUnit unit) {
return boxed.delay(delay, unit);
}
/**
* @param delay
* @param unit
* @param scheduler
* @return
* @see rx.Observable#delay(long, java.util.concurrent.TimeUnit, rx.Scheduler)
*/
public final Observable delay(long delay, TimeUnit unit, Scheduler scheduler) {
return boxed.delay(delay, unit, scheduler);
}
/**
* @param delay
* @param unit
* @return
* @see rx.Observable#delaySubscription(long, java.util.concurrent.TimeUnit)
*/
public final Observable delaySubscription(long delay, TimeUnit unit) {
return boxed.delaySubscription(delay, unit);
}
/**
* @param delay
* @param unit
* @param scheduler
* @return
* @see rx.Observable#delaySubscription(long, java.util.concurrent.TimeUnit, rx.Scheduler)
*/
public final Observable delaySubscription(long delay, TimeUnit unit, Scheduler scheduler) {
return boxed.delaySubscription(delay, unit, scheduler);
}
/**
* @param subscriptionDelay
* @return
* @see rx.Observable#delaySubscription(rx.functions.Func0)
*/
public final Observable delaySubscription(Func0 extends Observable> subscriptionDelay) {
return boxed.delaySubscription(subscriptionDelay);
}
/**
* @param other
* @return
* @see rx.Observable#delaySubscription(rx.Observable)
*/
public final Observable delaySubscription(Observable other) {
return boxed.delaySubscription(other);
}
/**
* @return
* @see rx.Observable#dematerialize()
*/
public final Observable dematerialize() {
return boxed.dematerialize();
}
/**
* @return
* @see rx.Observable#distinct()
*/
public final Observable distinct() {
return boxed.distinct();
}
/**
* @param keySelector
* @return
* @see rx.Observable#distinct(rx.functions.Func1)
*/
public final Observable distinct(Func1 super T, ? extends U> keySelector) {
return boxed.distinct(keySelector);
}
/**
* @return
* @see rx.Observable#distinctUntilChanged()
*/
public final Observable distinctUntilChanged() {
return boxed.distinctUntilChanged();
}
/**
* @param keySelector
* @return
* @see rx.Observable#distinctUntilChanged(rx.functions.Func1)
*/
public final Observable distinctUntilChanged(Func1 super T, ? extends U> keySelector) {
return boxed.distinctUntilChanged(keySelector);
}
/**
* @param onCompleted
* @return
* @see rx.Observable#doOnCompleted(rx.functions.Action0)
*/
public final Observable doOnCompleted(Action0 onCompleted) {
return boxed.doOnCompleted(onCompleted);
}
/**
* @param onNotification
* @return
* @see rx.Observable#doOnEach(rx.functions.Action1)
*/
public final Observable doOnEach(Action1> onNotification) {
return boxed.doOnEach(onNotification);
}
/**
* @param observer
* @return
* @see rx.Observable#doOnEach(rx.Observer)
*/
public final Observable doOnEach(Observer super T> observer) {
return boxed.doOnEach(observer);
}
/**
* @param onError
* @return
* @see rx.Observable#doOnError(rx.functions.Action1)
*/
public final Observable doOnError(Action1 onError) {
return boxed.doOnError(onError);
}
/**
* @param onNext
* @return
* @see rx.Observable#doOnNext(rx.functions.Action1)
*/
public final Observable doOnNext(Action1 super T> onNext) {
return boxed.doOnNext(onNext);
}
/**
* @param onRequest
* @return
* @see rx.Observable#doOnRequest(rx.functions.Action1)
*/
public final Observable doOnRequest(Action1 onRequest) {
return boxed.doOnRequest(onRequest);
}
/**
* @param subscribe
* @return
* @see rx.Observable#doOnSubscribe(rx.functions.Action0)
*/
public final Observable doOnSubscribe(Action0 subscribe) {
return boxed.doOnSubscribe(subscribe);
}
/**
* @param onTerminate
* @return
* @see rx.Observable#doOnTerminate(rx.functions.Action0)
*/
public final Observable doOnTerminate(Action0 onTerminate) {
return boxed.doOnTerminate(onTerminate);
}
/**
* @param unsubscribe
* @return
* @see rx.Observable#doOnUnsubscribe(rx.functions.Action0)
*/
public final Observable doOnUnsubscribe(Action0 unsubscribe) {
return boxed.doOnUnsubscribe(unsubscribe);
}
/**
* @param mapper
* @return
* @see rx.Observable#concatMapEager(rx.functions.Func1)
*/
public final Observable concatMapEager(Func1 super T, ? extends Observable extends R>> mapper) {
return boxed.concatMapEager(mapper);
}
/**
* @param mapper
* @param capacityHint
* @return
* @see rx.Observable#concatMapEager(rx.functions.Func1, int)
*/
public final Observable concatMapEager(Func1 super T, ? extends Observable extends R>> mapper,
int capacityHint) {
return boxed.concatMapEager(mapper, capacityHint);
}
/**
* @param mapper
* @param capacityHint
* @param maxConcurrent
* @return
* @see rx.Observable#concatMapEager(rx.functions.Func1, int, int)
*/
public final Observable concatMapEager(Func1 super T, ? extends Observable extends R>> mapper,
int capacityHint, int maxConcurrent) {
return boxed.concatMapEager(mapper, capacityHint, maxConcurrent);
}
/**
* @param index
* @return
* @see rx.Observable#elementAt(int)
*/
public final Observable elementAt(int index) {
return boxed.elementAt(index);
}
/**
* @param index
* @param defaultValue
* @return
* @see rx.Observable#elementAtOrDefault(int, java.lang.Object)
*/
public final Observable elementAtOrDefault(int index, T defaultValue) {
return boxed.elementAtOrDefault(index, defaultValue);
}
/**
* @param predicate
* @return
* @see rx.Observable#exists(rx.functions.Func1)
*/
public final Observable exists(Func1 super T, Boolean> predicate) {
return boxed.exists(predicate);
}
/**
* @param predicate
* @return
* @see rx.Observable#filter(rx.functions.Func1)
*/
public final Observable filter(Func1 super T, Boolean> predicate) {
return boxed.filter(predicate);
}
/**
* @param action
* @return
* @deprecated
* @see rx.Observable#finallyDo(rx.functions.Action0)
*/
public final Observable finallyDo(Action0 action) {
return boxed.finallyDo(action);
}
/**
* @param action
* @return
* @see rx.Observable#doAfterTerminate(rx.functions.Action0)
*/
public final Observable doAfterTerminate(Action0 action) {
return boxed.doAfterTerminate(action);
}
/**
* @return
* @see rx.Observable#first()
*/
public final Observable first() {
return boxed.first();
}
/**
* @param predicate
* @return
* @see rx.Observable#first(rx.functions.Func1)
*/
public final Observable first(Func1 super T, Boolean> predicate) {
return boxed.first(predicate);
}
/**
* @param defaultValue
* @return
* @see rx.Observable#firstOrDefault(java.lang.Object)
*/
public final Observable firstOrDefault(T defaultValue) {
return boxed.firstOrDefault(defaultValue);
}
/**
* @param defaultValue
* @param predicate
* @return
* @see rx.Observable#firstOrDefault(java.lang.Object, rx.functions.Func1)
*/
public final Observable firstOrDefault(T defaultValue, Func1 super T, Boolean> predicate) {
return boxed.firstOrDefault(defaultValue, predicate);
}
/**
* @param func
* @return
* @see rx.Observable#flatMap(rx.functions.Func1)
*/
public final Observable flatMap(Func1 super T, ? extends Observable extends R>> func) {
return boxed.flatMap(func);
}
/**
* @param func
* @param maxConcurrent
* @return
* @see rx.Observable#flatMap(rx.functions.Func1, int)
*/
public final Observable flatMap(Func1 super T, ? extends Observable extends R>> func,
int maxConcurrent) {
return boxed.flatMap(func, maxConcurrent);
}
/**
* @param onNext
* @param onError
* @param onCompleted
* @return
* @see rx.Observable#flatMap(rx.functions.Func1, rx.functions.Func1, rx.functions.Func0)
*/
public final Observable flatMap(Func1 super T, ? extends Observable extends R>> onNext,
Func1 super Throwable, ? extends Observable extends R>> onError,
Func0 extends Observable extends R>> onCompleted) {
return boxed.flatMap(onNext, onError, onCompleted);
}
/**
* @param onNext
* @param onError
* @param onCompleted
* @param maxConcurrent
* @return
* @see rx.Observable#flatMap(rx.functions.Func1, rx.functions.Func1, rx.functions.Func0, int)
*/
public final Observable flatMap(Func1 super T, ? extends Observable extends R>> onNext,
Func1 super Throwable, ? extends Observable extends R>> onError,
Func0 extends Observable extends R>> onCompleted, int maxConcurrent) {
return boxed.flatMap(onNext, onError, onCompleted, maxConcurrent);
}
/**
* @param collectionSelector
* @param resultSelector
* @return
* @see rx.Observable#flatMap(rx.functions.Func1, rx.functions.Func2)
*/
public final Observable flatMap(Func1 super T, ? extends Observable extends U>> collectionSelector,
Func2 super T, ? super U, ? extends R> resultSelector) {
return boxed.flatMap(collectionSelector, resultSelector);
}
/**
* @param collectionSelector
* @param resultSelector
* @param maxConcurrent
* @return
* @see rx.Observable#flatMap(rx.functions.Func1, rx.functions.Func2, int)
*/
public final Observable flatMap(Func1 super T, ? extends Observable extends U>> collectionSelector,
Func2 super T, ? super U, ? extends R> resultSelector, int maxConcurrent) {
return boxed.flatMap(collectionSelector, resultSelector, maxConcurrent);
}
/**
* @param collectionSelector
* @return
* @see rx.Observable#flatMapIterable(rx.functions.Func1)
*/
public final Observable flatMapIterable(
Func1 super T, ? extends Iterable extends R>> collectionSelector) {
return boxed.flatMapIterable(collectionSelector);
}
/**
* @param collectionSelector
* @param maxConcurrent
* @return
* @see rx.Observable#flatMapIterable(rx.functions.Func1, int)
*/
public final Observable flatMapIterable(Func1 super T, ? extends Iterable extends R>> collectionSelector,
int maxConcurrent) {
return boxed.flatMapIterable(collectionSelector, maxConcurrent);
}
/**
* @param collectionSelector
* @param resultSelector
* @return
* @see rx.Observable#flatMapIterable(rx.functions.Func1, rx.functions.Func2)
*/
public final Observable flatMapIterable(
Func1 super T, ? extends Iterable extends U>> collectionSelector,
Func2 super T, ? super U, ? extends R> resultSelector) {
return boxed.flatMapIterable(collectionSelector, resultSelector);
}
/**
* @param collectionSelector
* @param resultSelector
* @param maxConcurrent
* @return
* @see rx.Observable#flatMapIterable(rx.functions.Func1, rx.functions.Func2, int)
*/
public final Observable flatMapIterable(
Func1 super T, ? extends Iterable extends U>> collectionSelector,
Func2 super T, ? super U, ? extends R> resultSelector, int maxConcurrent) {
return boxed.flatMapIterable(collectionSelector, resultSelector, maxConcurrent);
}
/**
* @param onNext
* @see rx.Observable#forEach(rx.functions.Action1)
*/
public final void forEach(Action1 super T> onNext) {
boxed.forEach(onNext);
}
/**
* @param onNext
* @param onError
* @see rx.Observable#forEach(rx.functions.Action1, rx.functions.Action1)
*/
public final void forEach(Action1 super T> onNext, Action1 onError) {
boxed.forEach(onNext, onError);
}
/**
* @param onNext
* @param onError
* @param onComplete
* @see rx.Observable#forEach(rx.functions.Action1, rx.functions.Action1, rx.functions.Action0)
*/
public final void forEach(Action1 super T> onNext, Action1 onError, Action0 onComplete) {
boxed.forEach(onNext, onError, onComplete);
}
/**
* @param keySelector
* @param elementSelector
* @return
* @see rx.Observable#groupBy(rx.functions.Func1, rx.functions.Func1)
*/
public final Observable> groupBy(Func1 super T, ? extends K> keySelector,
Func1 super T, ? extends R> elementSelector) {
return boxed.groupBy(keySelector, elementSelector);
}
/**
* @param keySelector
* @return
* @see rx.Observable#groupBy(rx.functions.Func1)
*/
public final Observable> groupBy(Func1 super T, ? extends K> keySelector) {
return boxed.groupBy(keySelector);
}
/**
* @param right
* @param leftDuration
* @param rightDuration
* @param resultSelector
* @return
* @see rx.Observable#groupJoin(rx.Observable, rx.functions.Func1, rx.functions.Func1, rx.functions.Func2)
*/
public final Observable groupJoin(Observable right,
Func1 super T, ? extends Observable> leftDuration,
Func1 super T2, ? extends Observable> rightDuration,
Func2 super T, ? super Observable, ? extends R> resultSelector) {
return boxed.groupJoin(right, leftDuration, rightDuration, resultSelector);
}
/**
* @return
* @see rx.Observable#ignoreElements()
*/
public final Observable ignoreElements() {
return boxed.ignoreElements();
}
/**
* @return
* @see rx.Observable#isEmpty()
*/
public final Observable isEmpty() {
return boxed.isEmpty();
}
/**
* @param right
* @param leftDurationSelector
* @param rightDurationSelector
* @param resultSelector
* @return
* @see rx.Observable#join(rx.Observable, rx.functions.Func1, rx.functions.Func1, rx.functions.Func2)
*/
public final Observable join(Observable right,
Func1> leftDurationSelector,
Func1> rightDurationSelector, Func2 resultSelector) {
return boxed.join(right, leftDurationSelector, rightDurationSelector, resultSelector);
}
/**
* @return
* @see rx.Observable#last()
*/
public final Observable last() {
return boxed.last();
}
/**
* @param predicate
* @return
* @see rx.Observable#last(rx.functions.Func1)
*/
public final Observable last(Func1 super T, Boolean> predicate) {
return boxed.last(predicate);
}
/**
* @param defaultValue
* @return
* @see rx.Observable#lastOrDefault(java.lang.Object)
*/
public final Observable lastOrDefault(T defaultValue) {
return boxed.lastOrDefault(defaultValue);
}
/**
* @param defaultValue
* @param predicate
* @return
* @see rx.Observable#lastOrDefault(java.lang.Object, rx.functions.Func1)
*/
public final Observable lastOrDefault(T defaultValue, Func1 super T, Boolean> predicate) {
return boxed.lastOrDefault(defaultValue, predicate);
}
/**
* @param count
* @return
* @see rx.Observable#limit(int)
*/
public final Observable limit(int count) {
return boxed.limit(count);
}
/**
* @param func
* @return
* @see rx.Observable#map(rx.functions.Func1)
*/
public final Observable map(Func1 super T, ? extends R> func) {
return boxed.map(func);
}
/**
* @return
* @see rx.Observable#materialize()
*/
public final Observable> materialize() {
return boxed.materialize();
}
/**
* @param t1
* @return
* @see rx.Observable#mergeWith(rx.Observable)
*/
public final Observable mergeWith(Observable extends T> t1) {
return boxed.mergeWith(t1);
}
/**
* @param scheduler
* @return
* @see rx.Observable#observeOn(rx.Scheduler)
*/
public final Observable observeOn(Scheduler scheduler) {
return boxed.observeOn(scheduler);
}
/**
* @param scheduler
* @param bufferSize
* @return
* @see rx.Observable#observeOn(rx.Scheduler, int)
*/
public final Observable observeOn(Scheduler scheduler, int bufferSize) {
return boxed.observeOn(scheduler, bufferSize);
}
/**
* @param scheduler
* @param delayError
* @return
* @see rx.Observable#observeOn(rx.Scheduler, boolean)
*/
public final Observable observeOn(Scheduler scheduler, boolean delayError) {
return boxed.observeOn(scheduler, delayError);
}
/**
* @param scheduler
* @param delayError
* @param bufferSize
* @return
* @see rx.Observable#observeOn(rx.Scheduler, boolean, int)
*/
public final Observable observeOn(Scheduler scheduler, boolean delayError, int bufferSize) {
return boxed.observeOn(scheduler, delayError, bufferSize);
}
/**
* @param klass
* @return
* @see rx.Observable#ofType(java.lang.Class)
*/
public final Observable ofType(Class klass) {
return boxed.ofType(klass);
}
/**
* @return
* @see rx.Observable#onBackpressureBuffer()
*/
public final Observable onBackpressureBuffer() {
return boxed.onBackpressureBuffer();
}
/**
* @param capacity
* @return
* @see rx.Observable#onBackpressureBuffer(long)
*/
public final Observable onBackpressureBuffer(long capacity) {
return boxed.onBackpressureBuffer(capacity);
}
/**
* @param capacity
* @param onOverflow
* @return
* @see rx.Observable#onBackpressureBuffer(long, rx.functions.Action0)
*/
public final Observable onBackpressureBuffer(long capacity, Action0 onOverflow) {
return boxed.onBackpressureBuffer(capacity, onOverflow);
}
/**
* @param capacity
* @param onOverflow
* @param overflowStrategy
* @return
* @see rx.Observable#onBackpressureBuffer(long, rx.functions.Action0, rx.BackpressureOverflow.Strategy)
*/
public final Observable onBackpressureBuffer(long capacity, Action0 onOverflow, Strategy overflowStrategy) {
return boxed.onBackpressureBuffer(capacity, onOverflow, overflowStrategy);
}
/**
* @param onDrop
* @return
* @see rx.Observable#onBackpressureDrop(rx.functions.Action1)
*/
public final Observable onBackpressureDrop(Action1 super T> onDrop) {
return boxed.onBackpressureDrop(onDrop);
}
/**
* @return
* @see rx.Observable#onBackpressureDrop()
*/
public final Observable onBackpressureDrop() {
return boxed.onBackpressureDrop();
}
/**
* @return
* @see rx.Observable#onBackpressureLatest()
*/
public final Observable onBackpressureLatest() {
return boxed.onBackpressureLatest();
}
/**
* @param resumeFunction
* @return
* @see rx.Observable#onErrorResumeNext(rx.functions.Func1)
*/
public final Observable onErrorResumeNext(Func1> resumeFunction) {
return boxed.onErrorResumeNext(resumeFunction);
}
/**
* @param resumeSequence
* @return
* @see rx.Observable#onErrorResumeNext(rx.Observable)
*/
public final Observable onErrorResumeNext(Observable extends T> resumeSequence) {
return boxed.onErrorResumeNext(resumeSequence);
}
/**
* @param resumeFunction
* @return
* @see rx.Observable#onErrorReturn(rx.functions.Func1)
*/
public final Observable onErrorReturn(Func1 resumeFunction) {
return boxed.onErrorReturn(resumeFunction);
}
/**
* @param resumeSequence
* @return
* @see rx.Observable#onExceptionResumeNext(rx.Observable)
*/
public final Observable onExceptionResumeNext(Observable extends T> resumeSequence) {
return boxed.onExceptionResumeNext(resumeSequence);
}
/**
* @return
* @see rx.Observable#publish()
*/
public final ConnectableObservable publish() {
return boxed.publish();
}
/**
* @param selector
* @return
* @see rx.Observable#publish(rx.functions.Func1)
*/
public final Observable publish(Func1 super Observable, ? extends Observable> selector) {
return boxed.publish(selector);
}
/**
* @param accumulator
* @return
* @see rx.Observable#reduce(rx.functions.Func2)
*/
public final Observable reduce(Func2 accumulator) {
return boxed.reduce(accumulator);
}
/**
* @param initialValue
* @param accumulator
* @return
* @see rx.Observable#reduce(java.lang.Object, rx.functions.Func2)
*/
public final Observable reduce(R initialValue, Func2 accumulator) {
return boxed.reduce(initialValue, accumulator);
}
/**
* @return
* @see rx.Observable#repeat()
*/
public final Observable repeat() {
return boxed.repeat();
}
/**
* @param scheduler
* @return
* @see rx.Observable#repeat(rx.Scheduler)
*/
public final Observable repeat(Scheduler scheduler) {
return boxed.repeat(scheduler);
}
/**
* @param count
* @return
* @see rx.Observable#repeat(long)
*/
public final Observable repeat(long count) {
return boxed.repeat(count);
}
/**
* @param count
* @param scheduler
* @return
* @see rx.Observable#repeat(long, rx.Scheduler)
*/
public final Observable repeat(long count, Scheduler scheduler) {
return boxed.repeat(count, scheduler);
}
/**
* @param notificationHandler
* @param scheduler
* @return
* @see rx.Observable#repeatWhen(rx.functions.Func1, rx.Scheduler)
*/
public final Observable repeatWhen(
Func1 super Observable extends Void>, ? extends Observable>> notificationHandler,
Scheduler scheduler) {
return boxed.repeatWhen(notificationHandler, scheduler);
}
/**
* @param notificationHandler
* @return
* @see rx.Observable#repeatWhen(rx.functions.Func1)
*/
public final Observable repeatWhen(
Func1 super Observable extends Void>, ? extends Observable>> notificationHandler) {
return boxed.repeatWhen(notificationHandler);
}
/**
* @return
* @see rx.Observable#replay()
*/
public final ConnectableObservable replay() {
return boxed.replay();
}
/**
* @param selector
* @return
* @see rx.Observable#replay(rx.functions.Func1)
*/
public final Observable replay(Func1 super Observable, ? extends Observable> selector) {
return boxed.replay(selector);
}
/**
* @param selector
* @param bufferSize
* @return
* @see rx.Observable#replay(rx.functions.Func1, int)
*/
public final Observable replay(Func1 super Observable, ? extends Observable> selector,
int bufferSize) {
return boxed.replay(selector, bufferSize);
}
/**
* @param selector
* @param bufferSize
* @param time
* @param unit
* @return
* @see rx.Observable#replay(rx.functions.Func1, int, long, java.util.concurrent.TimeUnit)
*/
public final Observable replay(Func1 super Observable, ? extends Observable> selector,
int bufferSize, long time, TimeUnit unit) {
return boxed.replay(selector, bufferSize, time, unit);
}
/**
* @param selector
* @param bufferSize
* @param time
* @param unit
* @param scheduler
* @return
* @see rx.Observable#replay(rx.functions.Func1, int, long, java.util.concurrent.TimeUnit, rx.Scheduler)
*/
public final Observable replay(Func1 super Observable, ? extends Observable> selector,
int bufferSize, long time, TimeUnit unit, Scheduler scheduler) {
return boxed.replay(selector, bufferSize, time, unit, scheduler);
}
/**
* @param selector
* @param bufferSize
* @param scheduler
* @return
* @see rx.Observable#replay(rx.functions.Func1, int, rx.Scheduler)
*/
public final Observable replay(Func1 super Observable, ? extends Observable> selector,
int bufferSize, Scheduler scheduler) {
return boxed.replay(selector, bufferSize, scheduler);
}
/**
* @param selector
* @param time
* @param unit
* @return
* @see rx.Observable#replay(rx.functions.Func1, long, java.util.concurrent.TimeUnit)
*/
public final Observable replay(Func1 super Observable, ? extends Observable> selector, long time,
TimeUnit unit) {
return boxed.replay(selector, time, unit);
}
/**
* @param selector
* @param time
* @param unit
* @param scheduler
* @return
* @see rx.Observable#replay(rx.functions.Func1, long, java.util.concurrent.TimeUnit, rx.Scheduler)
*/
public final