/** * Copyright 2013 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package rx; import static org.junit.Assert.*; import static rx.util.functions.Functions.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import rx.joins.Pattern2; import rx.joins.Plan0; import rx.observables.BlockingObservable; import rx.observables.ConnectableObservable; import rx.observables.GroupedObservable; import rx.operators.OperationAll; import rx.operators.OperationAmb; import rx.operators.OperationAny; import rx.operators.OperationAsObservable; import rx.operators.OperationAverage; import rx.operators.OperationBuffer; import rx.operators.OperationCache; import rx.operators.OperationCast; import rx.operators.OperationCombineLatest; import rx.operators.OperationConcat; import rx.operators.OperationConditionals; import rx.operators.OperationDebounce; import rx.operators.OperationDefaultIfEmpty; import rx.operators.OperationDefer; import rx.operators.OperationDelay; import rx.operators.OperationDematerialize; import rx.operators.OperationDistinct; import rx.operators.OperationDistinctUntilChanged; import rx.operators.OperationDoOnEach; import rx.operators.OperationElementAt; import rx.operators.OperationFilter; import rx.operators.OperationFinally; import rx.operators.OperationGroupBy; import rx.operators.OperationGroupByUntil; import rx.operators.OperationGroupJoin; import rx.operators.OperationInterval; import rx.operators.OperationJoin; import rx.operators.OperationJoinPatterns; import rx.operators.OperationMap; import rx.operators.OperationMaterialize; import rx.operators.OperationMerge; import rx.operators.OperationMergeDelayError; import rx.operators.OperationMinMax; import rx.operators.OperationMulticast; import rx.operators.OperationObserveOn; import rx.operators.OperationOnErrorResumeNextViaFunction; import rx.operators.OperationOnErrorResumeNextViaObservable; import rx.operators.OperationOnErrorReturn; import rx.operators.OperationOnExceptionResumeNextViaObservable; import rx.operators.OperationParallel; import rx.operators.OperationParallelMerge; import rx.operators.OperationRepeat; import rx.operators.OperationReplay; import rx.operators.OperationRetry; import rx.operators.OperationSample; import rx.operators.OperationScan; import rx.operators.OperationSequenceEqual; import rx.operators.OperationSingle; import rx.operators.OperationSkip; import rx.operators.OperationSkipLast; import rx.operators.OperationSkipUntil; import rx.operators.OperationSkipWhile; import rx.operators.OperationSubscribeOn; import rx.operators.OperationSum; import rx.operators.OperationSwitch; import rx.operators.OperationSynchronize; import rx.operators.OperationTake; import rx.operators.OperationTakeLast; import rx.operators.OperationTakeUntil; import rx.operators.OperationTakeWhile; import rx.operators.OperationThrottleFirst; import rx.operators.OperationTimeInterval; import rx.operators.OperationTimeout; import rx.operators.OperationTimer; import rx.operators.OperationTimestamp; import rx.operators.OperationToMap; import rx.operators.OperationToMultimap; import rx.operators.OperationToObservableFuture; import rx.operators.OperationToObservableIterable; import rx.operators.OperationToObservableList; import rx.operators.OperationToObservableSortedList; import rx.operators.OperationUsing; import rx.operators.OperationWindow; import rx.operators.OperationZip; import rx.operators.SafeObservableSubscription; import rx.operators.SafeObserver; import rx.plugins.RxJavaErrorHandler; import rx.plugins.RxJavaObservableExecutionHook; import rx.plugins.RxJavaPlugins; import rx.schedulers.Schedulers; import rx.subjects.AsyncSubject; import rx.subjects.PublishSubject; import rx.subjects.ReplaySubject; import rx.subjects.Subject; import rx.subscriptions.Subscriptions; import rx.util.OnErrorNotImplementedException; import rx.util.Range; import rx.util.TimeInterval; import rx.util.Timestamped; import rx.util.functions.Action0; import rx.util.functions.Action1; import rx.util.functions.Action2; import rx.util.functions.Func0; import rx.util.functions.Func1; import rx.util.functions.Func2; import rx.util.functions.Func3; import rx.util.functions.Func4; import rx.util.functions.Func5; import rx.util.functions.Func6; import rx.util.functions.Func7; import rx.util.functions.Func8; import rx.util.functions.Func9; import rx.util.functions.FuncN; import rx.util.functions.Function; import rx.util.functions.Functions; /** * The Observable interface that implements the Reactive Pattern. *
* This interface provides overloaded methods for subscribing as well as * delegate methods to the various operators. *
* The documentation for this interface makes use of marble diagrams. The * following legend explains these diagrams: *
*
*
* For more information see the
* RxJava Wiki
*
* @param
* NOTE: Use {@link #create(OnSubscribeFunc)} to create an Observable
* instead of this constructor unless you specifically have a need for
* inheritance.
*
* @param onSubscribe {@link OnSubscribeFunc} to be executed when
* {@link #subscribe(Observer)} is called
*/
protected Observable(OnSubscribeFunc
* A typical implementation of {@code subscribe} does the following:
*
* An
* For more information see the
* RxJava Wiki
*
* @param observer the Observer
* @return a {@link Subscription} reference with which the {@link Observer}
* can stop receiving items before the Observable has finished
* sending them
* @throws IllegalArgumentException if the {@link Observer} provided as the
* argument to {@code subscribe()} is
* {@code null}
*/
public Subscription subscribe(Observer super T> observer) {
// allow the hook to intercept and/or decorate
OnSubscribeFunc
* A typical implementation of {@code subscribe} does the following:
*
* An {@code Observable
* For more information see the
* RxJava Wiki
*
* @param observer the Observer
* @param scheduler the {@link Scheduler} on which Observers subscribe to
* the Observable
* @return a {@link Subscription} reference with which Observers can stop
* receiving items and notifications before the Observable has
* finished sending them
* @throws IllegalArgumentException if an argument to {@code subscribe()}
* is {@code null}
*/
public Subscription subscribe(Observer super T> observer, Scheduler scheduler) {
return subscribeOn(scheduler).subscribe(observer);
}
/**
* Protects against errors being thrown from Observer implementations and
* ensures onNext/onError/onCompleted contract compliance.
*
* See https://github.com/Netflix/RxJava/issues/216 for a discussion on
* "Guideline 6.4: Protect calls to user code from within an operator"
*/
private Subscription protectivelyWrapAndSubscribe(Observer super T> o) {
SafeObservableSubscription subscription = new SafeObservableSubscription();
return subscription.wrap(subscribe(new SafeObserver
*
* Write the function you pass to
* A well-formed Observable must invoke either the Observer's
*
* See Rx Design
* Guidelines (PDF) for detailed information.
*
* @param
*
*
*
*
*
* Note: the entire iterable sequence is immediately emitted each time an
* {@link Observer} subscribes. Since this occurs before the
* {@link Subscription} is returned, it is not possible to unsubscribe from
* the sequence before it completes.
*
* @param iterable the source {@link Iterable} sequence
* @param
*
*
* Note: the entire array is immediately emitted each time an
* {@link Observer} subscribes. Since this occurs before the
* {@link Subscription} is returned, it is not possible to unsubscribe from
* the sequence before it completes.
*
* @param items the source array
* @param
*
* Note: the entire array is immediately emitted each time an
* {@link Observer} subscribes. Since this occurs before the
* {@link Subscription} is returned, it is not possible to unsubscribe from
* the sequence before it completes.
*
* @param items the source array
* @param scheduler the scheduler to emit the items of the array
* @param
*
* Note: the item is immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 the item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param t4 fourth item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param t4 fourth item
* @param t5 fifth item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param t4 fourth item
* @param t5 fifth item
* @param t6 sixth item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param t4 fourth item
* @param t5 fifth item
* @param t6 sixth item
* @param t7 seventh item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param t4 fourth item
* @param t5 fifth item
* @param t6 sixth item
* @param t7 seventh item
* @param t8 eighth item
* @param
*
* Note: the items will be immediately emitted each time an {@link Observer}
* subscribes. Since this occurs before the {@link Subscription} is
* returned, it is not possible to unsubscribe from the sequence before it
* completes.
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param t4 fourth item
* @param t5 fifth item
* @param t6 sixth item
* @param t7 seventh item
* @param t8 eighth item
* @param t9 ninth item
* @param
*
* @param t1 first item
* @param t2 second item
* @param t3 third item
* @param t4 fourth item
* @param t5 fifth item
* @param t6 sixth item
* @param t7 seventh item
* @param t8 eighth item
* @param t9 ninth item
* @param t10 tenth item
* @param
*
* @param start the value of the first Integer in the sequence
* @param count the number of sequential Integers to generate
* @return an Observable that emits a range of sequential Integers
* @see RxJava Wiki: range()
* @see MSDN: Observable.Range
*/
public static Observable
*
*
*
*
* The defer operator allows you to defer or delay emitting items from an
* Observable until such time as an Observer subscribes to the Observable.
* This allows an {@link Observer} to easily obtain updates or a refreshed
* version of the sequence.
*
* @param observableFactory the Observable factory function to invoke for
* each {@link Observer} that subscribes to the
* resulting Observable
* @param
*
* To convert any object into an Observable that emits that object, pass
* that object into the
* This is similar to the {@link #from(java.lang.Object[])} method, except
* that
*
* This is a scheduler version of {@link Observable#just(Object)}.
*
* @param value the item to emit
* @param
*
* You can combine the items emitted by multiple Observables so that they
* act like a single Observable, by using the {@code merge} method.
*
* @param source an Observable that emits Observables
* @return an Observable that emits items that are the result of flattening
* the items emitted by the Observables emitted by the
* {@code source} Observable
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @param t7 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @param t7 an Observable to be merged
* @param t8 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* You can combine items emitted by multiple Observables so that they act
* like a single Observable, by using the {@code merge} method.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @param t7 an Observable to be merged
* @param t8 an Observable to be merged
* @param t9 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
*
*
*
*
*
*
*
*
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param source an Observable that emits Observables
* @return an Observable that emits items that are the result of flattening
* the items emitted by the Observables emitted by the
* {@code source} Observable
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @param t7 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @param t7 an Observable to be merged
* @param t8 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* Even if multiple merged Observables send {@code onError} notifications,
* {@code mergeDelayError} will only invoke the {@code onError} method of
* its Observers once.
*
* This method allows an Observer to receive all successfully emitted items
* from all of the source Observables without being interrupted by an error
* notification from one of them.
*
* @param t1 an Observable to be merged
* @param t2 an Observable to be merged
* @param t3 an Observable to be merged
* @param t4 an Observable to be merged
* @param t5 an Observable to be merged
* @param t6 an Observable to be merged
* @param t7 an Observable to be merged
* @param t8 an Observable to be merged
* @param t9 an Observable to be merged
* @return an Observable that emits items that are the result of flattening
* the items emitted by the {@code source} Observables
* @see RxJava Wiki: mergeDelayError()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* This Observable is useful primarily for testing purposes.
*
* @param
*
*
*
*
*
*
*
Observable<T> instance is responsible for accepting
* all subscriptions and notifying all Observers. Unless the documentation
* for a particular Observable<T> implementation
* indicates otherwise, Observers should make no assumptions about the order
* in which multiple Observers will receive their notifications.
*
*
* create so that it behaves as
* an Observable: It should invoke the Observer's
* {@link Observer#onNext onNext}, {@link Observer#onError onError}, and
* {@link Observer#onCompleted onCompleted} methods appropriately.
* onCompleted method exactly once or its onError
* method exactly once.
*
*
* @param
*
* @param scheduler the scheduler to call the
{@link Observer#onCompleted onCompleted} method
* @param
*
* @param exception the particular error to report
* @param
*
* @param exception the particular error to report
* @param scheduler the scheduler to call the
* {@link Observer#onError onError} method
* @param
*
*
* @param iterable the source {@link Iterable} sequence
* @param scheduler the scheduler to emit the items of the iterable
* @param
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* @param start the value of the first Integer in the sequence
* @param count the number of sequential Integers to generate
* @param scheduler the scheduler to run the generator loop on
* @return an Observable that emits a range of sequential Integers
* @see RxJava Wiki: range()
* @see MSDN: Observable.Range
*/
public static Observable
*
* @return an Observable that emits the items emitted by the source
* Observable repeatedly and in sequence
* @see RxJava Wiki: repeat()
* @see MSDN: Observable.Repeat
*/
public Observable
*
* @param scheduler the scheduler to send the values on.
* @return an Observable that emits the items emitted by the source
* Observable repeatedly and in sequence
* @see RxJava Wiki: repeat()
* @see MSDN: Observable.Repeat
*/
public Observable
*
* just method.
* from() will convert an {@link Iterable} object into an
* Observable that emits each of the items in the Iterable, one at a time,
* while the just() method converts an Iterable into an
* Observable that emits the entire Iterable as a single item.
*
* @param value the item to emit
* @param
*
*
*
*
*
*
*
*
*
*
*
* @param observables an Observable that emits Observables
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @param t3 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @param t3 an Observable to be concatenated
* @param t4 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @param t3 an Observable to be concatenated
* @param t4 an Observable to be concatenated
* @param t5 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @param t3 an Observable to be concatenated
* @param t4 an Observable to be concatenated
* @param t5 an Observable to be concatenated
* @param t6 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @param t3 an Observable to be concatenated
* @param t4 an Observable to be concatenated
* @param t5 an Observable to be concatenated
* @param t6 an Observable to be concatenated
* @param t7 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @param t3 an Observable to be concatenated
* @param t4 an Observable to be concatenated
* @param t5 an Observable to be concatenated
* @param t6 an Observable to be concatenated
* @param t7 an Observable to be concatenated
* @param t8 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
* @param t1 an Observable to be concatenated
* @param t2 an Observable to be concatenated
* @param t3 an Observable to be concatenated
* @param t4 an Observable to be concatenated
* @param t5 an Observable to be concatenated
* @param t6 an Observable to be concatenated
* @param t7 an Observable to be concatenated
* @param t8 an Observable to be concatenated
* @param t9 an Observable to be concatenated
* @return an Observable that emits items that are the result of combining
* the items emitted by the {@code source} Observables, one after
* the other
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
@SuppressWarnings("unchecked")
// suppress because the types are checked by the method signature before using a vararg
public static
*
*
*
*
*
*
*
*
*
*
*
* @param sequenceOfSequences the source Observable that emits Observables
* @return an Observable that emits only the items emitted by the Observable
* most recently emitted by the source Observable
* @see RxJava Wiki: switchOnNext()
* @deprecated use {@link #switchOnNext}
*/
@Deprecated
public static
*
* @param sequenceOfSequences the source Observable that emits Observables
* @return an Observable that emits only the items emitted by the Observable
* most recently emitted by the source Observable
* @see RxJava Wiki: switchOnNext()
*/
public static
*
* @param sequenceOfSequences the source Observable that emits Observables
* @return an Observable that emits only the items emitted by the Observable
* most recently emitted by the source Observable
* @see RxJava Wiki: switchOnNext()
* @see {@link #switchOnNext(Observable)}
*/
public static
*
* @param
*
* @param
*
* @param