/** * Copyright 2014 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 rx.functions.Functions.alwaysFalse; import java.util.*; import java.util.concurrent.*; import rx.exceptions.*; import rx.functions.*; import rx.internal.operators.*; import rx.internal.util.ScalarSynchronousObservable; import rx.observables.*; import rx.observers.SafeSubscriber; import rx.plugins.*; import rx.schedulers.*; import rx.subjects.*; import rx.subscriptions.Subscriptions; /** * The Observable class that implements the Reactive Pattern. *
* This class provides methods for subscribing to the Observable as well as delegate methods to the various * Observers. *
* The documentation for this class makes use of marble diagrams. The following legend explains these diagrams: *
*
*
* For more information see the RxJava Wiki
*
* @param
* Note: Use {@link #create(OnSubscribe)} to create an Observable, instead of this constructor,
* unless you specifically have a need for inheritance.
*
* @param f
* {@link OnSubscribe} to be executed when {@link #subscribe(Subscriber)} is called
*/
protected Observable(OnSubscribe
*
* Write the function you pass to {@code create} so that it behaves as an Observable: It should invoke the
* Subscriber's {@link Subscriber#onNext onNext}, {@link Subscriber#onError onError}, and
* {@link Subscriber#onCompleted onCompleted} methods appropriately.
*
* A well-formed Observable must invoke either the Subscriber's {@code onCompleted} method exactly once or
* its {@code onError} method exactly once.
*
* See Rx Design Guidelines (PDF) for detailed
* information.
*
* {@code create} does not operate by default on a particular {@link Scheduler}.
*
* @param
* In other words, this allows chaining Observers together on an Observable for acting on the values within
* the Observable.
* {@code
* observable.map(...).filter(...).take(5).lift(new OperatorA()).lift(new OperatorB(...)).subscribe()
* }
*
* {@code lift} does not operate by default on a particular {@link Scheduler}.
*
* @param lift the Operator that implements the Observable-operating function to be applied to the source
* Observable
* @return an Observable that is the result of applying the lifted Operator to the source Observable
* @since 0.17
*/
public final
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param sources
* an Iterable of Observable sources competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @param o3
* an Observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @param o3
* an Observable competing to react first
* @param o4
* an Observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @param o3
* an Observable competing to react first
* @param o4
* an Observable competing to react first
* @param o5
* an Observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @param o3
* an Observable competing to react first
* @param o4
* an Observable competing to react first
* @param o5
* an Observable competing to react first
* @param o6
* an Observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @param o3
* an Observable competing to react first
* @param o4
* an Observable competing to react first
* @param o5
* an Observable competing to react first
* @param o6
* an Observable competing to react first
* @param o7
* an Observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @param o3
* an Observable competing to react first
* @param o4
* an Observable competing to react first
* @param o5
* an Observable competing to react first
* @param o6
* an Observable competing to react first
* @param o7
* an Observable competing to react first
* @param o8
* an observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code amb} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* an Observable competing to react first
* @param o2
* an Observable competing to react first
* @param o3
* an Observable competing to react first
* @param o4
* an Observable competing to react first
* @param o5
* an Observable competing to react first
* @param o6
* an Observable competing to react first
* @param o7
* an Observable competing to react first
* @param o8
* an Observable competing to react first
* @param o9
* an Observable competing to react first
* @return an Observable that emits the same sequence of items as whichever of the source Observables first
* emitted an item
* @see RxJava Wiki: amb()
* @see MSDN: Observable.Amb
*/
public final static
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param o3
* the third source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param o3
* the third source Observable
* @param o4
* the fourth source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param o3
* the third source Observable
* @param o4
* the fourth source Observable
* @param o5
* the fifth source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param o3
* the third source Observable
* @param o4
* the fourth source Observable
* @param o5
* the fifth source Observable
* @param o6
* the sixth source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param o3
* the third source Observable
* @param o4
* the fourth source Observable
* @param o5
* the fifth source Observable
* @param o6
* the sixth source Observable
* @param o7
* the seventh source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param o3
* the third source Observable
* @param o4
* the fourth source Observable
* @param o5
* the fifth source Observable
* @param o6
* the sixth source Observable
* @param o7
* the seventh source Observable
* @param o8
* the eighth source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
*
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param o1
* the first source Observable
* @param o2
* the second source Observable
* @param o3
* the third source Observable
* @param o4
* the fourth source Observable
* @param o5
* the fifth source Observable
* @param o6
* the sixth source Observable
* @param o7
* the seventh source Observable
* @param o8
* the eighth source Observable
* @param o9
* the ninth source Observable
* @param combineFunction
* the aggregation function used to combine the items emitted by the source Observables
* @return an Observable that emits items that are the result of combining the items emitted by the source
* Observables by means of the given aggregation function
* @see RxJava Wiki: combineLatest()
*/
@SuppressWarnings("unchecked")
public static final
* {@code combineLatest} does not operate by default on a particular {@link Scheduler}.
*
* @param
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @param observables
* an Observable that emits Observables
* @return an Observable that emits items all of the items emitted by the Observables emitted by
* {@code observables}, one after the other, without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* an Observable to be concatenated
* @param t2
* an Observable to be concatenated
* @return an Observable that emits items emitted by the two source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @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 emitted by the three source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @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 emitted by the four source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @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 emitted by the five source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @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 emitted by the six source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @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 emitted by the seven source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @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 emitted by the eight source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* {@code concat} does not operate by default on a particular {@link Scheduler}.
*
* @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 emitted by the nine source Observables, one after the other,
* without interleaving them
* @see RxJava Wiki: concat()
* @see MSDN: Observable.Concat
*/
public final static
*
* The defer Observer 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.
*
* {@code defer} does not operate by default on a particular {@link Scheduler}.
*
* @param observableFactory
* the Observable factory function to invoke for each {@link Observer} that subscribes to the
* resulting Observable
* @param
*
* {@code empty} does not operate by default on a particular {@link Scheduler}.
*
* @param
*
*
* {@code error} does not operate by default on a particular {@link Scheduler}.
*
* @param exception
* the particular Throwable to pass to {@link Observer#onError onError}
* @param
*
*
* You can convert any object that supports the {@link Future} interface into an Observable that emits the
* return value of the {@link Future#get} method of that object, by passing the object into the {@code from}
* method.
*
* Important note: This Observable is blocking; you cannot unsubscribe from it.
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param future
* the source {@link Future}
* @param
*
* You can convert any object that supports the {@link Future} interface into an Observable that emits the
* return value of the {@link Future#get} method of that object, by passing the object into the {@code from}
* method.
*
* Important note: This Observable is blocking; you cannot unsubscribe from it.
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param future
* the source {@link Future}
* @param timeout
* the maximum time to wait before calling {@code get}
* @param unit
* the {@link TimeUnit} of the {@code timeout} argument
* @param
*
* You can convert any object that supports the {@link Future} interface into an Observable that emits the
* return value of the {@link Future#get} method of that object, by passing the object into the {@code from}
* method.
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param future
* the source {@link Future}
* @param scheduler
* the {@link Scheduler} to wait for the Future on. Use a Scheduler such as
* {@link Schedulers#io()} that can block and wait on the Future
* @param
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param iterable
* the source {@link Iterable} sequence
* @param
*
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* the item
* @param
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* first item
* @param t2
* second item
* @param
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* first item
* @param t2
* second item
* @param t3
* third item
* @param
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* first item
* @param t2
* second item
* @param t3
* third item
* @param t4
* fourth item
* @param
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* first item
* @param t2
* second item
* @param t3
* third item
* @param t4
* fourth item
* @param t5
* fifth item
* @param
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @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
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @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
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @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
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @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
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @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
*
* {@code from} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* the source Array
* @param
*
*
* {@code interval} operates by default on the {@code computation} {@link Scheduler}.
*
* @param interval
* interval size in time units (see below)
* @param unit
* time units to use for the interval size
* @return an Observable that emits a sequential number each time interval
* @see RxJava Wiki: interval()
* @see MSDN: Observable.Interval
*/
public final static Observable
*
*
* To convert any object into an Observable that emits that object, pass that object into the {@code just}
* method.
*
* This is similar to the {@link #from(java.lang.Object[])} method, except that {@code 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 {@code just} method converts an Iterable into an Observable that emits the entire
* Iterable as a single item.
*
* {@code just} does not operate by default on a particular {@link Scheduler}.
*
* @param value
* the item to emit
* @param
*
*
* You can combine the items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @param sequences
* the Iterable of Observables
* @return an Observable that emits items that are the result of flattening the items emitted by the
* Observables in the Iterable
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
public final static
*
* You can combine the items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @param sequences
* the Iterable of Observables
* @param maxConcurrent
* the maximum number of Observables that may be subscribed to concurrently
* @return an Observable that emits items that are the result of flattening the items emitted by the
* Observables in the Iterable
* @throws IllegalArgumentException
* if {@code maxConcurrent} is less than or equal to 0
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
public final static
*
* You can combine the items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* @param sequences
* the Iterable of Observables
* @param maxConcurrent
* the maximum number of Observables that may be subscribed to concurrently
* @param scheduler
* the Scheduler on which to traverse the Iterable of Observables
* @return an Observable that emits items that are the result of flattening the items emitted by the
* Observables in the Iterable
* @throws IllegalArgumentException
* if {@code maxConcurrent} is less than or equal to 0
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
public final static
*
* You can combine the items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* @param sequences
* the Iterable of Observables
* @param scheduler
* the Scheduler on which to traverse the Iterable of Observables
* @return an Observable that emits items that are the result of flattening the items emitted by the
* Observables in the Iterable
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
public final static
*
* You can combine the items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @param source
* an Observable that emits Observables
* @return an Observable that emits items that are the result of flattening the Observables emitted by the
* {@code source} Observable
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
public final static
*
* You can combine the items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @param source
* an Observable that emits Observables
* @param maxConcurrent
* the maximum number of Observables that may be subscribed to concurrently
* @return an Observable that emits items that are the result of flattening the Observables emitted by the
* {@code source} Observable
* @throws IllegalArgumentException
* if {@code maxConcurrent} is less than or equal to 0
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
public final static
*
* You can combine items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @param t1
* an Observable to be merged
* @param t2
* an Observable to be merged
* @return an Observable that emits all of the items emitted by the source Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
public final static
*
* You can combine items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @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 all of the items emitted by the source Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
public final static
*
* You can combine items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @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 all of the items emitted by the source Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
public final static
*
* You can combine items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @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 all of the items emitted by the source Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
public final static
*
* You can combine items emitted by multiple Observables so that they appear as a single Observable, by
* using the {@code merge} method.
*
* {@code merge} does not operate by default on a particular {@link Scheduler}.
*
* @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 all of the items emitted by the source Observables
* @see RxJava Wiki: merge()
* @see MSDN: Observable.Merge
*/
@SuppressWarnings("unchecked")
public final static
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
* @param scheduler
* the Scheduler to use to call the {@link Observer#onCompleted onCompleted} method
* @param
*
*
* @param exception
* the particular Throwable to pass to {@link Observer#onError onError}
* @param scheduler
* the Scheduler on which to call {@link Observer#onError onError}
* @param
*
*
*
*
*
* @param iterable
* the source {@link Iterable} sequence
* @param scheduler
* the Scheduler on which the Observable is to emit the items of the Iterable
* @param
*
*
*
*
*
*
*
*
*
*
*
*
* @param items
* the source Array
* @param scheduler
* the Scheduler on which the Observable emits the items of the Array
* @param
*
*
* @param interval
* interval size in time units (see below)
* @param unit
* time units to use for the interval size
* @param scheduler
* the Scheduler to use for scheduling the items
* @return an Observable that emits a sequential number each time interval
* @see RxJava Wiki: interval()
* @see MSDN: Observable.Interval
*/
public final static Observable
*
*
* @param value
* the item to emit
* @param
*
*
*
*
*
*
*
*
*
*
*