diff --git a/rxjava-core/src/main/java/rx/Observable.java b/rxjava-core/src/main/java/rx/Observable.java index 746362ca78..64a1058ca4 100644 --- a/rxjava-core/src/main/java/rx/Observable.java +++ b/rxjava-core/src/main/java/rx/Observable.java @@ -60,7 +60,6 @@ import rx.operators.OperationOnErrorResumeNextViaObservable; import rx.operators.OperationOnErrorReturn; import rx.operators.OperationOnExceptionResumeNextViaObservable; -import rx.operators.OperationParallelMerge; import rx.operators.OperationReplay; import rx.operators.OperationSample; import rx.operators.OperationSequenceEqual; @@ -109,6 +108,7 @@ import rx.operators.OperatorOnErrorFlatMap; import rx.operators.OperatorOnErrorResumeNextViaFunction; import rx.operators.OperatorParallel; +import rx.operators.OperatorParallelMerge; import rx.operators.OperatorPivot; import rx.operators.OperatorRepeat; import rx.operators.OperatorRetry; @@ -2323,7 +2323,7 @@ public final static Observable never() { * @see RxJava Wiki: parallelMerge() */ public final static Observable> parallelMerge(Observable> source, int parallelObservables) { - return OperationParallelMerge.parallelMerge(source, parallelObservables); + return OperatorParallelMerge.parallelMerge(source, parallelObservables); } /** @@ -2346,7 +2346,7 @@ public final static Observable> parallelMerge(ObservableRxJava Wiki: parallelMerge() */ public final static Observable> parallelMerge(Observable> source, int parallelObservables, Scheduler scheduler) { - return OperationParallelMerge.parallelMerge(source, parallelObservables, scheduler); + return OperatorParallelMerge.parallelMerge(source, parallelObservables, scheduler); } /** diff --git a/rxjava-core/src/main/java/rx/operators/OperationParallelMerge.java b/rxjava-core/src/main/java/rx/operators/OperatorParallelMerge.java similarity index 93% rename from rxjava-core/src/main/java/rx/operators/OperationParallelMerge.java rename to rxjava-core/src/main/java/rx/operators/OperatorParallelMerge.java index 7c06082c41..1e5e4fc2d4 100644 --- a/rxjava-core/src/main/java/rx/operators/OperationParallelMerge.java +++ b/rxjava-core/src/main/java/rx/operators/OperatorParallelMerge.java @@ -23,7 +23,8 @@ import rx.observables.GroupedObservable; import rx.schedulers.Schedulers; -public class OperationParallelMerge { +public final class OperatorParallelMerge { + private OperatorParallelMerge() { throw new IllegalStateException("No instances!"); } public static Observable> parallelMerge(final Observable> source, final int parallelObservables) { return parallelMerge(source, parallelObservables, Schedulers.immediate()); diff --git a/rxjava-core/src/test/java/rx/operators/OperationParallelMergeTest.java b/rxjava-core/src/test/java/rx/operators/OperatorParallelMergeTest.java similarity index 91% rename from rxjava-core/src/test/java/rx/operators/OperationParallelMergeTest.java rename to rxjava-core/src/test/java/rx/operators/OperatorParallelMergeTest.java index b126189c37..138fbff62b 100644 --- a/rxjava-core/src/test/java/rx/operators/OperationParallelMergeTest.java +++ b/rxjava-core/src/test/java/rx/operators/OperatorParallelMergeTest.java @@ -30,7 +30,7 @@ import rx.schedulers.Schedulers; import rx.subjects.PublishSubject; -public class OperationParallelMergeTest { +public class OperatorParallelMergeTest { @Test public void testParallelMerge() { @@ -41,8 +41,8 @@ public void testParallelMerge() { Observable> fourStreams = Observable.> from(p1, p2, p3, p4); - Observable> twoStreams = OperationParallelMerge.parallelMerge(fourStreams, 2); - Observable> threeStreams = OperationParallelMerge.parallelMerge(fourStreams, 3); + Observable> twoStreams = Observable.parallelMerge(fourStreams, 2); + Observable> threeStreams = Observable.parallelMerge(fourStreams, 3); List> fourList = fourStreams.toList().toBlockingObservable().last(); List> threeList = threeStreams.toList().toBlockingObservable().last(); @@ -62,7 +62,7 @@ public void testNumberOfThreads() { final ConcurrentHashMap threads = new ConcurrentHashMap(); // parallelMerge into 3 streams and observeOn for each // we expect 3 threads in the output - OperationParallelMerge.parallelMerge(getStreams(), 3) + Observable.parallelMerge(getStreams(), 3) .flatMap(new Func1, Observable>() { @Override @@ -89,7 +89,7 @@ public void testNumberOfThreadsOnScheduledMerge() { // now we parallelMerge into 3 streams and observeOn for each // we expect 3 threads in the output - Observable.merge(OperationParallelMerge.parallelMerge(getStreams(), 3, Schedulers.newThread())) + Observable.merge(Observable.parallelMerge(getStreams(), 3, Schedulers.newThread())) .toBlockingObservable().forEach(new Action1() { @Override