diff --git a/src/main/java/rx/Observable.java b/src/main/java/rx/Observable.java index 8e94b3fc0d..7754f87c43 100644 --- a/src/main/java/rx/Observable.java +++ b/src/main/java/rx/Observable.java @@ -91,7 +91,7 @@ protected Observable(OnSubscribe f) { * function * @see ReactiveX operators documentation: Create */ - public final static Observable create(OnSubscribe f) { + public static Observable create(OnSubscribe f) { return new Observable(hook.onCreate(f)); } @@ -279,7 +279,7 @@ public Completable toCompletable() { * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Iterable> sources) { + public static Observable amb(Iterable> sources) { return create(OnSubscribeAmb.amb(sources)); } @@ -301,7 +301,7 @@ public final static Observable amb(IterableReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2) { + public static Observable amb(Observable o1, Observable o2) { return create(OnSubscribeAmb.amb(o1, o2)); } @@ -325,7 +325,7 @@ public final static Observable amb(Observable o1, Observable * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2, Observable o3) { + public static Observable amb(Observable o1, Observable o2, Observable o3) { return create(OnSubscribeAmb.amb(o1, o2, o3)); } @@ -351,7 +351,7 @@ public final static Observable amb(Observable o1, Observable * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4) { + public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4) { return create(OnSubscribeAmb.amb(o1, o2, o3, o4)); } @@ -379,7 +379,7 @@ public final static Observable amb(Observable o1, Observable * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5) { + public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5) { return create(OnSubscribeAmb.amb(o1, o2, o3, o4, o5)); } @@ -409,7 +409,7 @@ public final static Observable amb(Observable o1, Observable * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6) { + public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6) { return create(OnSubscribeAmb.amb(o1, o2, o3, o4, o5, o6)); } @@ -441,7 +441,7 @@ public final static Observable amb(Observable o1, Observable * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7) { + public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7) { return create(OnSubscribeAmb.amb(o1, o2, o3, o4, o5, o6, o7)); } @@ -475,7 +475,7 @@ public final static Observable amb(Observable o1, Observable * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8) { + public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8) { return create(OnSubscribeAmb.amb(o1, o2, o3, o4, o5, o6, o7, o8)); } @@ -511,7 +511,7 @@ public final static Observable amb(Observable o1, Observable * emitted an item or sent a termination notification * @see ReactiveX operators documentation: Amb */ - public final static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Observable o9) { + public static Observable amb(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Observable o9) { return create(OnSubscribeAmb.amb(o1, o2, o3, o4, o5, o6, o7, o8, o9)); } @@ -537,7 +537,7 @@ public final static Observable amb(Observable o1, Observable * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Func2 combineFunction) { + public static Observable combineLatest(Observable o1, Observable o2, Func2 combineFunction) { return combineLatest(Arrays.asList(o1, o2), Functions.fromFunc(combineFunction)); } @@ -565,7 +565,7 @@ public static final Observable combineLatest(ObservableReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Observable o3, Func3 combineFunction) { + public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Func3 combineFunction) { return combineLatest(Arrays.asList(o1, o2, o3), Functions.fromFunc(combineFunction)); } @@ -595,7 +595,7 @@ public static final Observable combineLatest(ObservableReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, + public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Func4 combineFunction) { return combineLatest(Arrays.asList(o1, o2, o3, o4), Functions.fromFunc(combineFunction)); } @@ -628,7 +628,7 @@ public static final Observable combineLatest(ObservableReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, + public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Func5 combineFunction) { return combineLatest(Arrays.asList(o1, o2, o3, o4, o5), Functions.fromFunc(combineFunction)); } @@ -663,7 +663,7 @@ public static final Observable combineLatest(Observab * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, + public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Func6 combineFunction) { return combineLatest(Arrays.asList(o1, o2, o3, o4, o5, o6), Functions.fromFunc(combineFunction)); } @@ -700,7 +700,7 @@ public static final Observable combineLatest(Obse * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, + public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Func7 combineFunction) { return combineLatest(Arrays.asList(o1, o2, o3, o4, o5, o6, o7), Functions.fromFunc(combineFunction)); } @@ -739,7 +739,7 @@ public static final Observable combineLatest( * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, + public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Func8 combineFunction) { return combineLatest(Arrays.asList(o1, o2, o3, o4, o5, o6, o7, o8), Functions.fromFunc(combineFunction)); } @@ -780,7 +780,7 @@ public static final Observable combineLat * @see ReactiveX operators documentation: CombineLatest */ @SuppressWarnings("unchecked") - public static final Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, + public static Observable combineLatest(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Observable o9, Func9 combineFunction) { return combineLatest(Arrays.asList(o1, o2, o3, o4, o5, o6, o7, o8, o9), Functions.fromFunc(combineFunction)); @@ -806,7 +806,7 @@ public static final Observable combin * Observables by means of the given aggregation function * @see ReactiveX operators documentation: CombineLatest */ - public static final Observable combineLatest(List> sources, FuncN combineFunction) { + public static Observable combineLatest(List> sources, FuncN combineFunction) { return create(new OnSubscribeCombineLatest(sources, combineFunction)); } @@ -826,7 +826,7 @@ public static final Observable combineLatest(ListReactiveX operators documentation: Concat */ - public final static Observable concat(Observable> observables) { + public static Observable concat(Observable> observables) { return observables.lift(OperatorConcat.instance()); } @@ -848,7 +848,7 @@ public final static Observable concat(ObservableReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2) { + public static Observable concat(Observable t1, Observable t2) { return concat(just(t1, t2)); } @@ -872,7 +872,7 @@ public final static Observable concat(Observable t1, Observa * without interleaving them * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2, Observable t3) { + public static Observable concat(Observable t1, Observable t2, Observable t3) { return concat(just(t1, t2, t3)); } @@ -898,7 +898,7 @@ public final static Observable concat(Observable t1, Observa * without interleaving them * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4) { + public static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4) { return concat(just(t1, t2, t3, t4)); } @@ -926,7 +926,7 @@ public final static Observable concat(Observable t1, Observa * without interleaving them * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5) { + public static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5) { return concat(just(t1, t2, t3, t4, t5)); } @@ -956,7 +956,7 @@ public final static Observable concat(Observable t1, Observa * without interleaving them * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6) { + public static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6) { return concat(just(t1, t2, t3, t4, t5, t6)); } @@ -988,7 +988,7 @@ public final static Observable concat(Observable t1, Observa * without interleaving them * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7) { + public static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7) { return concat(just(t1, t2, t3, t4, t5, t6, t7)); } @@ -1022,7 +1022,7 @@ public final static Observable concat(Observable t1, Observa * without interleaving them * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8) { + public static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8) { return concat(just(t1, t2, t3, t4, t5, t6, t7, t8)); } @@ -1058,7 +1058,7 @@ public final static Observable concat(Observable t1, Observa * without interleaving them * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8, Observable t9) { + public static Observable concat(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8, Observable t9) { return concat(just(t1, t2, t3, t4, t5, t6, t7, t8, t9)); } @@ -1086,7 +1086,7 @@ public final static Observable concat(Observable t1, Observa * Observable factory function * @see ReactiveX operators documentation: Defer */ - public final static Observable defer(Func0> observableFactory) { + public static Observable defer(Func0> observableFactory) { return create(new OnSubscribeDefer(observableFactory)); } @@ -1117,7 +1117,7 @@ public void call(Subscriber subscriber) { * @see ReactiveX operators documentation: Empty */ @SuppressWarnings("unchecked") - public final static Observable empty() { + public static Observable empty() { return (Observable) EmptyHolder.INSTANCE; } @@ -1139,7 +1139,7 @@ public final static Observable empty() { * the Observer subscribes to it * @see ReactiveX operators documentation: Throw */ - public final static Observable error(Throwable exception) { + public static Observable error(Throwable exception) { return new ThrowObservable(exception); } @@ -1166,7 +1166,7 @@ public final static Observable error(Throwable exception) { * @return an Observable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ - public final static Observable from(Future future) { + public static Observable from(Future future) { return create(OnSubscribeToObservableFuture.toObservableFuture(future)); } @@ -1197,7 +1197,7 @@ public final static Observable from(Future future) { * @return an Observable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ - public final static Observable from(Future future, long timeout, TimeUnit unit) { + public static Observable from(Future future, long timeout, TimeUnit unit) { return create(OnSubscribeToObservableFuture.toObservableFuture(future, timeout, unit)); } @@ -1225,7 +1225,7 @@ public final static Observable from(Future future, long time * @return an Observable that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ - public final static Observable from(Future future, Scheduler scheduler) { + public static Observable from(Future future, Scheduler scheduler) { // TODO in a future revision the Scheduler will become important because we'll start polling instead of blocking on the Future return create(OnSubscribeToObservableFuture.toObservableFuture(future)).subscribeOn(scheduler); } @@ -1247,7 +1247,7 @@ public final static Observable from(Future future, Scheduler * @return an Observable that emits each item in the source {@link Iterable} sequence * @see ReactiveX operators documentation: From */ - public final static Observable from(Iterable iterable) { + public static Observable from(Iterable iterable) { return create(new OnSubscribeFromIterable(iterable)); } @@ -1267,7 +1267,7 @@ public final static Observable from(Iterable iterable) { * @return an Observable that emits each item in the source Array * @see ReactiveX operators documentation: From */ - public final static Observable from(T[] array) { + public static Observable from(T[] array) { int n = array.length; if (n == 0) { return empty(); @@ -1321,7 +1321,7 @@ public static Observable fromCallable(Callable func) { * @return an Observable that emits a sequential number each time interval * @see ReactiveX operators documentation: Interval */ - public final static Observable interval(long interval, TimeUnit unit) { + public static Observable interval(long interval, TimeUnit unit) { return interval(interval, interval, unit, Schedulers.computation()); } @@ -1344,7 +1344,7 @@ public final static Observable interval(long interval, TimeUnit unit) { * @return an Observable that emits a sequential number each time interval * @see ReactiveX operators documentation: Interval */ - public final static Observable interval(long interval, TimeUnit unit, Scheduler scheduler) { + public static Observable interval(long interval, TimeUnit unit, Scheduler scheduler) { return interval(interval, interval, unit, scheduler); } @@ -1372,7 +1372,7 @@ public final static Observable interval(long interval, TimeUnit unit, Sche * @see ReactiveX operators documentation: Interval * @since 1.0.12 */ - public final static Observable interval(long initialDelay, long period, TimeUnit unit) { + public static Observable interval(long initialDelay, long period, TimeUnit unit) { return interval(initialDelay, period, unit, Schedulers.computation()); } @@ -1402,7 +1402,7 @@ public final static Observable interval(long initialDelay, long period, Ti * @see ReactiveX operators documentation: Interval * @since 1.0.12 */ - public final static Observable interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { + public static Observable interval(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { return create(new OnSubscribeTimerPeriodically(initialDelay, period, unit, scheduler)); } @@ -1430,7 +1430,7 @@ public final static Observable interval(long initialDelay, long period, Ti * @return an Observable that emits {@code value} as a single item and then completes * @see ReactiveX operators documentation: Just */ - public final static Observable just(final T value) { + public static Observable just(final T value) { return ScalarSynchronousObservable.create(value); } @@ -1454,7 +1454,7 @@ public final static Observable just(final T value) { */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2) { + public static Observable just(T t1, T t2) { return from((T[])new Object[] { t1, t2 }); } @@ -1480,7 +1480,7 @@ public final static Observable just(T t1, T t2) { */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3) { + public static Observable just(T t1, T t2, T t3) { return from((T[])new Object[] { t1, t2, t3 }); } @@ -1508,7 +1508,7 @@ public final static Observable just(T t1, T t2, T t3) { */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3, T t4) { + public static Observable just(T t1, T t2, T t3, T t4) { return from((T[])new Object[] { t1, t2, t3, t4 }); } @@ -1538,7 +1538,7 @@ public final static Observable just(T t1, T t2, T t3, T t4) { */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3, T t4, T t5) { + public static Observable just(T t1, T t2, T t3, T t4, T t5) { return from((T[])new Object[] { t1, t2, t3, t4, t5 }); } @@ -1570,7 +1570,7 @@ public final static Observable just(T t1, T t2, T t3, T t4, T t5) { */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6) { + public static Observable just(T t1, T t2, T t3, T t4, T t5, T t6) { return from((T[])new Object[] { t1, t2, t3, t4, t5, t6 }); } @@ -1604,7 +1604,7 @@ public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6) { */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { + public static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7) { return from((T[])new Object[] { t1, t2, t3, t4, t5, t6, t7 }); } @@ -1640,7 +1640,7 @@ public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8) { + public static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8) { return from((T[])new Object[] { t1, t2, t3, t4, t5, t6, t7, t8 }); } @@ -1678,7 +1678,7 @@ public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9) { + public static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9) { return from((T[])new Object[] { t1, t2, t3, t4, t5, t6, t7, t8, t9 }); } @@ -1718,7 +1718,7 @@ public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T */ // suppress unchecked because we are using varargs inside the method @SuppressWarnings("unchecked") - public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9, T t10) { + public static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T t7, T t8, T t9, T t10) { return from((T[])new Object[] { t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 }); } @@ -1740,7 +1740,7 @@ public final static Observable just(T t1, T t2, T t3, T t4, T t5, T t6, T * Observables in the Iterable * @see ReactiveX operators documentation: Merge */ - public final static Observable merge(Iterable> sequences) { + public static Observable merge(Iterable> sequences) { return merge(from(sequences)); } @@ -1767,7 +1767,7 @@ public final static Observable merge(IterableReactiveX operators documentation: Merge */ - public final static Observable merge(Iterable> sequences, int maxConcurrent) { + public static Observable merge(Iterable> sequences, int maxConcurrent) { return merge(from(sequences), maxConcurrent); } @@ -1791,7 +1791,7 @@ public final static Observable merge(IterableReactiveX operators documentation: Merge */ @SuppressWarnings({"unchecked", "rawtypes"}) - public final static Observable merge(Observable> source) { + public static Observable merge(Observable> source) { if (source.getClass() == ScalarSynchronousObservable.class) { return ((ScalarSynchronousObservable)source).scalarFlatMap((Func1)UtilityFunctions.identity()); } @@ -1824,7 +1824,7 @@ public final static Observable merge(Observable Observable merge(Observable> source, int maxConcurrent) { + public static Observable merge(Observable> source, int maxConcurrent) { if (source.getClass() == ScalarSynchronousObservable.class) { return ((ScalarSynchronousObservable)source).scalarFlatMap((Func1)UtilityFunctions.identity()); } @@ -1851,7 +1851,7 @@ public final static Observable merge(ObservableReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2) { + public static Observable merge(Observable t1, Observable t2) { return merge(new Observable[] { t1, t2 }); } @@ -1877,7 +1877,7 @@ public final static Observable merge(Observable t1, Observab * @see ReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2, Observable t3) { + public static Observable merge(Observable t1, Observable t2, Observable t3) { return merge(new Observable[] { t1, t2, t3 }); } @@ -1905,7 +1905,7 @@ public final static Observable merge(Observable t1, Observab * @see ReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4) { + public static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4) { return merge(new Observable[] { t1, t2, t3, t4 }); } @@ -1935,7 +1935,7 @@ public final static Observable merge(Observable t1, Observab * @see ReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5) { + public static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5) { return merge(new Observable[] { t1, t2, t3, t4, t5 }); } @@ -1967,7 +1967,7 @@ public final static Observable merge(Observable t1, Observab * @see ReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6) { + public static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6) { return merge(new Observable[] { t1, t2, t3, t4, t5, t6 }); } @@ -2001,7 +2001,7 @@ public final static Observable merge(Observable t1, Observab * @see ReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7) { + public static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7) { return merge(new Observable[] { t1, t2, t3, t4, t5, t6, t7 }); } @@ -2037,7 +2037,7 @@ public final static Observable merge(Observable t1, Observab * @see ReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8) { + public static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8) { return merge(new Observable[] { t1, t2, t3, t4, t5, t6, t7, t8 }); } @@ -2075,7 +2075,7 @@ public final static Observable merge(Observable t1, Observab * @see ReactiveX operators documentation: Merge */ @SuppressWarnings("unchecked") - public final static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8, Observable t9) { + public static Observable merge(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8, Observable t9) { return merge(new Observable[] { t1, t2, t3, t4, t5, t6, t7, t8, t9 }); } @@ -2096,7 +2096,7 @@ public final static Observable merge(Observable t1, Observab * @return an Observable that emits all of the items emitted by the Observables in the Array * @see ReactiveX operators documentation: Merge */ - public final static Observable merge(Observable[] sequences) { + public static Observable merge(Observable[] sequences) { return merge(from(sequences)); } @@ -2121,7 +2121,7 @@ public final static Observable merge(Observable[] sequences) * @see ReactiveX operators documentation: Merge * @since 1.1.0 */ - public final static Observable merge(Observable[] sequences, int maxConcurrent) { + public static Observable merge(Observable[] sequences, int maxConcurrent) { return merge(from(sequences), maxConcurrent); } @@ -2149,7 +2149,7 @@ public final static Observable merge(Observable[] sequences, * {@code source} Observable * @see ReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable> source) { + public static Observable mergeDelayError(Observable> source) { return source.lift(OperatorMerge.instance(true)); } @@ -2182,7 +2182,7 @@ public final static Observable mergeDelayError(Observable Observable mergeDelayError(Observable> source, int maxConcurrent) { + public static Observable mergeDelayError(Observable> source, int maxConcurrent) { return source.lift(OperatorMerge.instance(true, maxConcurrent)); } @@ -2211,7 +2211,7 @@ public final static Observable mergeDelayError(ObservableReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable t1, Observable t2) { + public static Observable mergeDelayError(Observable t1, Observable t2) { return mergeDelayError(just(t1, t2)); } @@ -2243,7 +2243,7 @@ public final static Observable mergeDelayError(Observable t1 * @return an Observable that emits all of the items that are emitted by the source Observables * @see ReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable t1, Observable t2, Observable t3) { + public static Observable mergeDelayError(Observable t1, Observable t2, Observable t3) { return mergeDelayError(just(t1, t2, t3)); } @@ -2277,7 +2277,7 @@ public final static Observable mergeDelayError(Observable t1 * @return an Observable that emits all of the items that are emitted by the source Observables * @see ReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4) { + public static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4) { return mergeDelayError(just(t1, t2, t3, t4)); } @@ -2313,7 +2313,7 @@ public final static Observable mergeDelayError(Observable t1 * @return an Observable that emits all of the items that are emitted by the source Observables * @see ReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5) { + public static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5) { return mergeDelayError(just(t1, t2, t3, t4, t5)); } @@ -2351,7 +2351,7 @@ public final static Observable mergeDelayError(Observable t1 * @return an Observable that emits all of the items that are emitted by the source Observables * @see ReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6) { + public static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6) { return mergeDelayError(just(t1, t2, t3, t4, t5, t6)); } @@ -2392,7 +2392,7 @@ public final static Observable mergeDelayError(Observable t1 * @return an Observable that emits all of the items that are emitted by the source Observables * @see ReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7) { + public static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7) { return mergeDelayError(just(t1, t2, t3, t4, t5, t6, t7)); } @@ -2435,7 +2435,7 @@ public final static Observable mergeDelayError(Observable t1 * @see ReactiveX operators documentation: Merge */ // suppress because the types are checked by the method signature before using a vararg - public final static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8) { + public static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8) { return mergeDelayError(just(t1, t2, t3, t4, t5, t6, t7, t8)); } @@ -2479,7 +2479,7 @@ public final static Observable mergeDelayError(Observable t1 * @return an Observable that emits all of the items that are emitted by the source Observables * @see ReactiveX operators documentation: Merge */ - public final static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8, Observable t9) { + public static Observable mergeDelayError(Observable t1, Observable t2, Observable t3, Observable t4, Observable t5, Observable t6, Observable t7, Observable t8, Observable t9) { return mergeDelayError(just(t1, t2, t3, t4, t5, t6, t7, t8, t9)); } @@ -2516,7 +2516,7 @@ public final Observable> nest() { * @return an Observable that never emits any items or sends any notifications to an {@link Observer} * @see ReactiveX operators documentation: Never */ - public final static Observable never() { + public static Observable never() { return NeverObservable.instance(); } @@ -2539,7 +2539,7 @@ public final static Observable never() { * {@code Integer.MAX_VALUE} * @see ReactiveX operators documentation: Range */ - public final static Observable range(int start, int count) { + public static Observable range(int start, int count) { if (count < 0) { throw new IllegalArgumentException("Count can not be negative"); } @@ -2574,7 +2574,7 @@ public final static Observable range(int start, int count) { * @return an Observable that emits a range of sequential Integers * @see ReactiveX operators documentation: Range */ - public final static Observable range(int start, int count, Scheduler scheduler) { + public static Observable range(int start, int count, Scheduler scheduler) { return range(start, count).subscribeOn(scheduler); } @@ -2597,7 +2597,7 @@ public final static Observable range(int start, int count, Scheduler sc * @return an Observable that emits a Boolean value that indicates whether the two sequences are the same * @see ReactiveX operators documentation: SequenceEqual */ - public final static Observable sequenceEqual(Observable first, Observable second) { + public static Observable sequenceEqual(Observable first, Observable second) { return sequenceEqual(first, second, new Func2() { @Override public final Boolean call(T first, T second) { @@ -2632,7 +2632,7 @@ public final Boolean call(T first, T second) { * are the same according to the specified function * @see ReactiveX operators documentation: SequenceEqual */ - public final static Observable sequenceEqual(Observable first, Observable second, Func2 equality) { + public static Observable sequenceEqual(Observable first, Observable second, Func2 equality) { return OperatorSequenceEqual.sequenceEqual(first, second, equality); } @@ -2658,7 +2658,7 @@ public final static Observable sequenceEqual(ObservableReactiveX operators documentation: Switch */ - public final static Observable switchOnNext(Observable> sequenceOfSequences) { + public static Observable switchOnNext(Observable> sequenceOfSequences) { return sequenceOfSequences.lift(OperatorSwitch.instance()); } @@ -2687,7 +2687,7 @@ public final static Observable switchOnNext(Observable timer(long initialDelay, long period, TimeUnit unit) { + public static Observable timer(long initialDelay, long period, TimeUnit unit) { return interval(initialDelay, period, unit, Schedulers.computation()); } @@ -2718,7 +2718,7 @@ public final static Observable timer(long initialDelay, long period, TimeU * @deprecated use {@link #interval(long, long, TimeUnit, Scheduler)} instead */ @Deprecated - public final static Observable timer(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { + public static Observable timer(long initialDelay, long period, TimeUnit unit, Scheduler scheduler) { return interval(initialDelay, period, unit, scheduler); } @@ -2741,7 +2741,7 @@ public final static Observable timer(long initialDelay, long period, TimeU * @return an Observable that emits one item after a specified delay, and then completes * @see ReactiveX operators documentation: Timer */ - public final static Observable timer(long delay, TimeUnit unit) { + public static Observable timer(long delay, TimeUnit unit) { return timer(delay, unit, Schedulers.computation()); } @@ -2768,7 +2768,7 @@ public final static Observable timer(long delay, TimeUnit unit) { * completes * @see ReactiveX operators documentation: Timer */ - public final static Observable timer(long delay, TimeUnit unit, Scheduler scheduler) { + public static Observable timer(long delay, TimeUnit unit, Scheduler scheduler) { return create(new OnSubscribeTimerOnce(delay, unit, scheduler)); } @@ -2790,7 +2790,7 @@ public final static Observable timer(long delay, TimeUnit unit, Scheduler * @return the Observable whose lifetime controls the lifetime of the dependent resource object * @see ReactiveX operators documentation: Using */ - public final static Observable using( + public static Observable using( final Func0 resourceFactory, final Func1> observableFactory, final Action1 disposeAction) { @@ -2826,7 +2826,7 @@ public final static Observable using( * @since (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number) */ @Experimental - public final static Observable using( + public static Observable using( final Func0 resourceFactory, final Func1> observableFactory, final Action1 disposeAction, boolean disposeEagerly) { @@ -2859,7 +2859,7 @@ public final static Observable using( * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public final static Observable zip(Iterable> ws, FuncN zipFunction) { + public static Observable zip(Iterable> ws, FuncN zipFunction) { List> os = new ArrayList>(); for (Observable o : ws) { os.add(o); @@ -2893,7 +2893,7 @@ public final static Observable zip(Iterable> ws, * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public final static Observable zip(Observable> ws, final FuncN zipFunction) { + public static Observable zip(Observable> ws, final FuncN zipFunction) { return ws.toList().map(new Func1>, Observable[]>() { @Override @@ -2933,7 +2933,7 @@ public Observable[] call(List> o) { * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, final Func2 zipFunction) { + public static Observable zip(Observable o1, Observable o2, final Func2 zipFunction) { return just(new Observable[] { o1, o2 }).lift(new OperatorZip(zipFunction)); } @@ -2969,7 +2969,7 @@ public final static Observable zip(Observable o1, O * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, Observable o3, Func3 zipFunction) { + public static Observable zip(Observable o1, Observable o2, Observable o3, Func3 zipFunction) { return just(new Observable[] { o1, o2, o3 }).lift(new OperatorZip(zipFunction)); } @@ -3007,7 +3007,7 @@ public final static Observable zip(Observable o * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Func4 zipFunction) { + public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Func4 zipFunction) { return just(new Observable[] { o1, o2, o3, o4 }).lift(new OperatorZip(zipFunction)); } @@ -3047,7 +3047,7 @@ public final static Observable zip(ObservableReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Func5 zipFunction) { + public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Func5 zipFunction) { return just(new Observable[] { o1, o2, o3, o4, o5 }).lift(new OperatorZip(zipFunction)); } @@ -3088,7 +3088,7 @@ public final static Observable zip(ObservableReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, + public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Func6 zipFunction) { return just(new Observable[] { o1, o2, o3, o4, o5, o6 }).lift(new OperatorZip(zipFunction)); } @@ -3132,7 +3132,7 @@ public final static Observable zip(ObservableReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, + public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Func7 zipFunction) { return just(new Observable[] { o1, o2, o3, o4, o5, o6, o7 }).lift(new OperatorZip(zipFunction)); } @@ -3178,7 +3178,7 @@ public final static Observable zip(Observable * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, + public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Func8 zipFunction) { return just(new Observable[] { o1, o2, o3, o4, o5, o6, o7, o8 }).lift(new OperatorZip(zipFunction)); } @@ -3226,7 +3226,7 @@ public final static Observable zip(Observ * @return an Observable that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public final static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, + public static Observable zip(Observable o1, Observable o2, Observable o3, Observable o4, Observable o5, Observable o6, Observable o7, Observable o8, Observable o9, Func9 zipFunction) { return just(new Observable[] { o1, o2, o3, o4, o5, o6, o7, o8, o9 }).lift(new OperatorZip(zipFunction)); } @@ -5870,7 +5870,7 @@ public final Observable map(Func1 func) { return lift(new OperatorMap(func)); } - private final Observable mapNotification(Func1 onNext, Func1 onError, Func0 onCompleted) { + private Observable mapNotification(Func1 onNext, Func1 onError, Func0 onCompleted) { return lift(new OperatorMapNotification(onNext, onError, onCompleted)); } diff --git a/src/main/java/rx/Single.java b/src/main/java/rx/Single.java index fb1fed35d7..5ffbee393b 100644 --- a/src/main/java/rx/Single.java +++ b/src/main/java/rx/Single.java @@ -139,7 +139,7 @@ private Single(final Observable.OnSubscribe f) { * @return a Single that, when a {@link Subscriber} subscribes to it, will execute the specified function * @see ReactiveX operators documentation: Create */ - public final static Single create(OnSubscribe f) { + public static Single create(OnSubscribe f) { return new Single(f); // TODO need hook } @@ -172,7 +172,7 @@ public interface OnSubscribe extends Action1> { * @return a Single that is the result of applying the lifted Operator to the source Single * @see RxJava wiki: Implementing Your Own Operators */ - private final Single lift(final Operator lift) { + private Single lift(final Operator lift) { // This method is private because not sure if we want to expose the Observable.Operator in this public API rather than a Single.Operator return new Single(new Observable.OnSubscribe() { @@ -257,7 +257,7 @@ private static Observable asObservable(Single t) { * @return a Single that emits an Observable that emits the same item as the source Single * @see ReactiveX operators documentation: To */ - private final Single> nest() { + private Single> nest() { return Single.just(asObservable(this)); } @@ -282,7 +282,7 @@ private final Single> nest() { * @return an Observable that emits items emitted by the two source Singles, one after the other. * @see ReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2) { + public static Observable concat(Single t1, Single t2) { return Observable.concat(asObservable(t1), asObservable(t2)); } @@ -304,7 +304,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2, Single t3) { + public static Observable concat(Single t1, Single t2, Single t3) { return Observable.concat(asObservable(t1), asObservable(t2), asObservable(t3)); } @@ -328,7 +328,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2, Single t3, Single t4) { + public static Observable concat(Single t1, Single t2, Single t3, Single t4) { return Observable.concat(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4)); } @@ -354,7 +354,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5) { + public static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5) { return Observable.concat(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5)); } @@ -382,7 +382,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6) { + public static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6) { return Observable.concat(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6)); } @@ -412,7 +412,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7) { + public static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7) { return Observable.concat(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6), asObservable(t7)); } @@ -444,7 +444,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8) { + public static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8) { return Observable.concat(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6), asObservable(t7), asObservable(t8)); } @@ -478,7 +478,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Concat */ - public final static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8, Single t9) { + public static Observable concat(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8, Single t9) { return Observable.concat(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6), asObservable(t7), asObservable(t8), asObservable(t9)); } @@ -500,7 +500,7 @@ public final static Observable concat(Single t1, SingleReactiveX operators documentation: Throw */ - public final static Single error(final Throwable exception) { + public static Single error(final Throwable exception) { return Single.create(new OnSubscribe() { @Override @@ -534,7 +534,7 @@ public void call(SingleSubscriber te) { * @return a {@code Single} that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ - public final static Single from(Future future) { + public static Single from(Future future) { return new Single(OnSubscribeToObservableFuture.toObservableFuture(future)); } @@ -565,7 +565,7 @@ public final static Single from(Future future) { * @return a {@code Single} that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ - public final static Single from(Future future, long timeout, TimeUnit unit) { + public static Single from(Future future, long timeout, TimeUnit unit) { return new Single(OnSubscribeToObservableFuture.toObservableFuture(future, timeout, unit)); } @@ -593,7 +593,7 @@ public final static Single from(Future future, long timeout, * @return a {@code Single} that emits the item from the source {@link Future} * @see ReactiveX operators documentation: From */ - public final static Single from(Future future, Scheduler scheduler) { + public static Single from(Future future, Scheduler scheduler) { return new Single(OnSubscribeToObservableFuture.toObservableFuture(future)).subscribeOn(scheduler); } @@ -653,7 +653,7 @@ public void call(SingleSubscriber singleSubscriber) { * @return a {@code Single} that emits {@code value} * @see ReactiveX operators documentation: Just */ - public final static Single just(final T value) { + public static Single just(final T value) { // TODO add similar optimization as ScalarSynchronousObservable return Single.create(new OnSubscribe() { @@ -682,7 +682,7 @@ public void call(SingleSubscriber te) { * by {@code source} * @see ReactiveX operators documentation: Merge */ - public final static Single merge(final Single> source) { + public static Single merge(final Single> source) { return Single.create(new OnSubscribe() { @Override @@ -723,7 +723,7 @@ public void onError(Throwable error) { * @return an Observable that emits all of the items emitted by the source Singles * @see ReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2) { + public static Observable merge(Single t1, Single t2) { return Observable.merge(asObservable(t1), asObservable(t2)); } @@ -748,7 +748,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2, Single t3) { + public static Observable merge(Single t1, Single t2, Single t3) { return Observable.merge(asObservable(t1), asObservable(t2), asObservable(t3)); } @@ -775,7 +775,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2, Single t3, Single t4) { + public static Observable merge(Single t1, Single t2, Single t3, Single t4) { return Observable.merge(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4)); } @@ -804,7 +804,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5) { + public static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5) { return Observable.merge(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5)); } @@ -835,7 +835,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6) { + public static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6) { return Observable.merge(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6)); } @@ -868,7 +868,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7) { + public static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7) { return Observable.merge(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6), asObservable(t7)); } @@ -903,7 +903,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8) { + public static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8) { return Observable.merge(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6), asObservable(t7), asObservable(t8)); } @@ -940,7 +940,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Merge */ - public final static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8, Single t9) { + public static Observable merge(Single t1, Single t2, Single t3, Single t4, Single t5, Single t6, Single t7, Single t8, Single t9) { return Observable.merge(asObservable(t1), asObservable(t2), asObservable(t3), asObservable(t4), asObservable(t5), asObservable(t6), asObservable(t7), asObservable(t8), asObservable(t9)); } @@ -964,7 +964,7 @@ public final static Observable merge(Single t1, SingleReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, final Func2 zipFunction) { + public static Single zip(Single s1, Single s2, final Func2 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2}, new FuncN() { @Override public R call(Object... args) { @@ -995,7 +995,7 @@ public R call(Object... args) { * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, Single s3, final Func3 zipFunction) { + public static Single zip(Single s1, Single s2, Single s3, final Func3 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2, s3}, new FuncN() { @Override public R call(Object... args) { @@ -1028,7 +1028,7 @@ public R call(Object... args) { * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, Single s3, Single s4, final Func4 zipFunction) { + public static Single zip(Single s1, Single s2, Single s3, Single s4, final Func4 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2, s3, s4}, new FuncN() { @Override public R call(Object... args) { @@ -1063,7 +1063,7 @@ public R call(Object... args) { * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, final Func5 zipFunction) { + public static Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, final Func5 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2, s3, s4, s5}, new FuncN() { @Override public R call(Object... args) { @@ -1100,7 +1100,7 @@ public R call(Object... args) { * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, + public static Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, final Func6 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2, s3, s4, s5, s6}, new FuncN() { @Override @@ -1140,7 +1140,7 @@ public R call(Object... args) { * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, Single s7, + public static Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, Single s7, final Func7 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2, s3, s4, s5, s6, s7}, new FuncN() { @Override @@ -1182,7 +1182,7 @@ public R call(Object... args) { * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, Single s7, Single s8, + public static Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, Single s7, Single s8, final Func8 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2, s3, s4, s5, s6, s7, s8}, new FuncN() { @Override @@ -1226,7 +1226,7 @@ public R call(Object... args) { * @return a Single that emits the zipped results * @see ReactiveX operators documentation: Zip */ - public static final Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, Single s7, Single s8, + public static Single zip(Single s1, Single s2, Single s3, Single s4, Single s5, Single s6, Single s7, Single s8, Single s9, final Func9 zipFunction) { return SingleOperatorZip.zip(new Single[] {s1, s2, s3, s4, s5, s6, s7, s8, s9}, new FuncN() { @Override diff --git a/src/main/java/rx/exceptions/CompositeException.java b/src/main/java/rx/exceptions/CompositeException.java index 79a49a7e74..17344ac426 100644 --- a/src/main/java/rx/exceptions/CompositeException.java +++ b/src/main/java/rx/exceptions/CompositeException.java @@ -247,7 +247,7 @@ public String getMessage() { } } - private final List getListOfCauses(Throwable ex) { + private List getListOfCauses(Throwable ex) { List list = new ArrayList(); Throwable root = ex.getCause(); if (root == null) { diff --git a/src/main/java/rx/internal/operators/OnSubscribeAmb.java b/src/main/java/rx/internal/operators/OnSubscribeAmb.java index 2ba94b0f97..c5d611375d 100644 --- a/src/main/java/rx/internal/operators/OnSubscribeAmb.java +++ b/src/main/java/rx/internal/operators/OnSubscribeAmb.java @@ -278,7 +278,7 @@ private static final class AmbSubscriber extends Subscriber { request(requested); } - private final void requestMore(long n) { + private void requestMore(long n) { request(n); } diff --git a/src/main/java/rx/internal/util/IndexedRingBuffer.java b/src/main/java/rx/internal/util/IndexedRingBuffer.java index 4bf941dee1..73f921b30d 100644 --- a/src/main/java/rx/internal/util/IndexedRingBuffer.java +++ b/src/main/java/rx/internal/util/IndexedRingBuffer.java @@ -58,7 +58,7 @@ protected IndexedRingBuffer createObject() { }; @SuppressWarnings("unchecked") - public final static IndexedRingBuffer getInstance() { + public static IndexedRingBuffer getInstance() { return (IndexedRingBuffer) POOL.borrowObject(); } diff --git a/src/main/java/rx/internal/util/ScalarSynchronousObservable.java b/src/main/java/rx/internal/util/ScalarSynchronousObservable.java index 797a4e4406..f4c8c3cd2e 100644 --- a/src/main/java/rx/internal/util/ScalarSynchronousObservable.java +++ b/src/main/java/rx/internal/util/ScalarSynchronousObservable.java @@ -78,7 +78,7 @@ static Producer createProducer(Subscriber s, T v) { * @param t the value to emit when requested * @return the new Observable */ - public static final ScalarSynchronousObservable create(T t) { + public static ScalarSynchronousObservable create(T t) { return new ScalarSynchronousObservable(t); } diff --git a/src/main/java/rx/internal/util/atomic/SpscLinkedArrayQueue.java b/src/main/java/rx/internal/util/atomic/SpscLinkedArrayQueue.java index 5a00430b96..33472a40da 100644 --- a/src/main/java/rx/internal/util/atomic/SpscLinkedArrayQueue.java +++ b/src/main/java/rx/internal/util/atomic/SpscLinkedArrayQueue.java @@ -242,17 +242,17 @@ private void soConsumerIndex(long v) { CONSUMER_INDEX.lazySet(this, v); } - private static final int calcWrappedOffset(long index, int mask) { + private static int calcWrappedOffset(long index, int mask) { return calcDirectOffset((int)index & mask); } - private static final int calcDirectOffset(int index) { + private static int calcDirectOffset(int index) { return index; } - private static final void soElement(AtomicReferenceArray buffer, int offset, Object e) { + private static void soElement(AtomicReferenceArray buffer, int offset, Object e) { buffer.lazySet(offset, e); } - private static final Object lvElement(AtomicReferenceArray buffer, int offset) { + private static Object lvElement(AtomicReferenceArray buffer, int offset) { return buffer.get(offset); } diff --git a/src/main/java/rx/internal/util/atomic/SpscUnboundedAtomicArrayQueue.java b/src/main/java/rx/internal/util/atomic/SpscUnboundedAtomicArrayQueue.java index af62a9ce60..54bdfeba5a 100644 --- a/src/main/java/rx/internal/util/atomic/SpscUnboundedAtomicArrayQueue.java +++ b/src/main/java/rx/internal/util/atomic/SpscUnboundedAtomicArrayQueue.java @@ -243,17 +243,17 @@ private void soConsumerIndex(long v) { CONSUMER_INDEX.lazySet(this, v); } - private static final int calcWrappedOffset(long index, int mask) { + private static int calcWrappedOffset(long index, int mask) { return calcDirectOffset((int)index & mask); } - private static final int calcDirectOffset(int index) { + private static int calcDirectOffset(int index) { return index; } - private static final void soElement(AtomicReferenceArray buffer, int offset, Object e) { + private static void soElement(AtomicReferenceArray buffer, int offset, Object e) { buffer.lazySet(offset, e); } - private static final Object lvElement(AtomicReferenceArray buffer, int offset) { + private static Object lvElement(AtomicReferenceArray buffer, int offset) { return buffer.get(offset); } diff --git a/src/main/java/rx/internal/util/unsafe/SpscUnboundedArrayQueue.java b/src/main/java/rx/internal/util/unsafe/SpscUnboundedArrayQueue.java index c579864549..680f62860a 100644 --- a/src/main/java/rx/internal/util/unsafe/SpscUnboundedArrayQueue.java +++ b/src/main/java/rx/internal/util/unsafe/SpscUnboundedArrayQueue.java @@ -264,17 +264,17 @@ private void soConsumerIndex(long v) { UNSAFE.putOrderedLong(this, C_INDEX_OFFSET, v); } - private static final long calcWrappedOffset(long index, long mask) { + private static long calcWrappedOffset(long index, long mask) { return calcDirectOffset(index & mask); } - private static final long calcDirectOffset(long index) { + private static long calcDirectOffset(long index) { return REF_ARRAY_BASE + (index << REF_ELEMENT_SHIFT); } - private static final void soElement(Object[] buffer, long offset, Object e) { + private static void soElement(Object[] buffer, long offset, Object e) { UNSAFE.putOrderedObject(buffer, offset, e); } - private static final Object lvElement(E[] buffer, long offset) { + private static Object lvElement(E[] buffer, long offset) { return UNSAFE.getObjectVolatile(buffer, offset); } diff --git a/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java b/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java index 88d0ebf4dd..a13989f4f1 100644 --- a/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java +++ b/src/main/java/rx/internal/util/unsafe/UnsafeAccess.java @@ -47,7 +47,7 @@ private UnsafeAccess() { UNSAFE = u; } - public static final boolean isUnsafeAvailable() { + public static boolean isUnsafeAvailable() { return UNSAFE != null; } diff --git a/src/main/java/rx/observables/GroupedObservable.java b/src/main/java/rx/observables/GroupedObservable.java index 8daea16643..ad9ceb9370 100644 --- a/src/main/java/rx/observables/GroupedObservable.java +++ b/src/main/java/rx/observables/GroupedObservable.java @@ -85,7 +85,7 @@ public void call(Subscriber s) { * @return a GroupedObservable that, when a {@link Subscriber} subscribes to it, will execute the specified * function */ - public final static GroupedObservable create(K key, OnSubscribe f) { + public static GroupedObservable create(K key, OnSubscribe f) { return new GroupedObservable(key, f); } diff --git a/src/main/java/rx/observers/Observers.java b/src/main/java/rx/observers/Observers.java index 090585b256..8425d62b6c 100644 --- a/src/main/java/rx/observers/Observers.java +++ b/src/main/java/rx/observers/Observers.java @@ -71,7 +71,7 @@ public static Observer empty() { * @return an {@code Observer} that calls {@code onNext} for each emitted item from the {@code Observable} * the {@code Observer} subscribes to */ - public static final Observer create(final Action1 onNext) { + public static Observer create(final Action1 onNext) { if (onNext == null) { throw new IllegalArgumentException("onNext can not be null"); } @@ -111,7 +111,7 @@ public final void onNext(T args) { * the {@code Observer} subscribes to, and calls {@code onError} if the {@code Observable} notifies * of an error */ - public static final Observer create(final Action1 onNext, final Action1 onError) { + public static Observer create(final Action1 onNext, final Action1 onError) { if (onNext == null) { throw new IllegalArgumentException("onNext can not be null"); } @@ -157,7 +157,7 @@ public final void onNext(T args) { * of an error, and calls {@code onComplete} if the {@code Observable} notifies that the observable * sequence is complete */ - public static final Observer create(final Action1 onNext, final Action1 onError, final Action0 onComplete) { + public static Observer create(final Action1 onNext, final Action1 onError, final Action0 onComplete) { if (onNext == null) { throw new IllegalArgumentException("onNext can not be null"); } diff --git a/src/main/java/rx/observers/Subscribers.java b/src/main/java/rx/observers/Subscribers.java index c1d2e4d014..f29f2c8a93 100644 --- a/src/main/java/rx/observers/Subscribers.java +++ b/src/main/java/rx/observers/Subscribers.java @@ -79,7 +79,7 @@ public void onNext(T t) { * @return a {@code Subscriber} that calls {@code onNext} for each emitted item from the {@code Observable} * the {@code Subscriber} subscribes to */ - public static final Subscriber create(final Action1 onNext) { + public static Subscriber create(final Action1 onNext) { if (onNext == null) { throw new IllegalArgumentException("onNext can not be null"); } @@ -119,7 +119,7 @@ public final void onNext(T args) { * the {@code Subscriber} subscribes to, and calls {@code onError} if the {@code Observable} * notifies of an error */ - public static final Subscriber create(final Action1 onNext, final Action1 onError) { + public static Subscriber create(final Action1 onNext, final Action1 onError) { if (onNext == null) { throw new IllegalArgumentException("onNext can not be null"); } @@ -165,7 +165,7 @@ public final void onNext(T args) { * of an error, and calls {@code onComplete} if the {@code Observable} notifies that the observable * sequence is complete */ - public static final Subscriber create(final Action1 onNext, final Action1 onError, final Action0 onComplete) { + public static Subscriber create(final Action1 onNext, final Action1 onError, final Action0 onComplete) { if (onNext == null) { throw new IllegalArgumentException("onNext can not be null"); } diff --git a/src/main/java/rx/subjects/ReplaySubject.java b/src/main/java/rx/subjects/ReplaySubject.java index ca166b6177..6b5b43c799 100644 --- a/src/main/java/rx/subjects/ReplaySubject.java +++ b/src/main/java/rx/subjects/ReplaySubject.java @@ -299,7 +299,7 @@ public static ReplaySubject createWithTimeAndSize(long time, TimeUnit uni * the shared state * @return the created subject */ - static final ReplaySubject createWithState(final BoundedState state, + static ReplaySubject createWithState(final BoundedState state, Action1> onStart) { SubjectSubscriptionManager ssm = new SubjectSubscriptionManager(); ssm.onStart = onStart;