Skip to content

Commit 867df14

Browse files
Rename OperatorFromIterable to OnSubscribeFromIterable
1 parent 589d360 commit 867df14

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
import rx.operators.OperationWindow;
9696
import rx.operators.OperatorCast;
9797
import rx.operators.OperatorDoOnEach;
98-
import rx.operators.OperatorFromIterable;
98+
import rx.operators.OnSubscribeFromIterable;
9999
import rx.operators.OperatorGroupBy;
100100
import rx.operators.OperatorMap;
101101
import rx.operators.OperatorMerge;
@@ -1217,7 +1217,7 @@ public final static <T> Observable<T> from(Future<? extends T> future, Scheduler
12171217
* @see <a href="https://github.com/Netflix/RxJava/wiki/Creating-Observables#wiki-from">RxJava Wiki: from()</a>
12181218
*/
12191219
public final static <T> Observable<T> from(Iterable<? extends T> iterable) {
1220-
return create(new OperatorFromIterable<T>(iterable));
1220+
return create(new OnSubscribeFromIterable<T>(iterable));
12211221
}
12221222

12231223
/**
@@ -1239,7 +1239,7 @@ public final static <T> Observable<T> from(Iterable<? extends T> iterable) {
12391239
* @see <a href="http://msdn.microsoft.com/en-us/library/hh212140.aspx">MSDN: Observable.ToObservable</a>
12401240
*/
12411241
public final static <T> Observable<T> from(Iterable<? extends T> iterable, Scheduler scheduler) {
1242-
return create(new OperatorFromIterable<T>(iterable)).subscribeOn(scheduler);
1242+
return create(new OnSubscribeFromIterable<T>(iterable)).subscribeOn(scheduler);
12431243
}
12441244

12451245
/**

rxjava-core/src/main/java/rx/operators/OperatorFromIterable.java renamed to rxjava-core/src/main/java/rx/operators/OnSubscribeFromIterable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
* You can convert any object that supports the Iterable interface into an Observable that emits
2727
* each item in the object, with the toObservable operation.
2828
*/
29-
public final class OperatorFromIterable<T> implements OnSubscribe<T> {
29+
public final class OnSubscribeFromIterable<T> implements OnSubscribe<T> {
3030

3131
final Iterable<? extends T> is;
3232

33-
public OperatorFromIterable(Iterable<? extends T> iterable) {
33+
public OnSubscribeFromIterable(Iterable<? extends T> iterable) {
3434
this.is = iterable;
3535
}
3636

rxjava-core/src/test/java/rx/operators/OperatorFromIterableTest.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
*/
1616
package rx.operators;
1717

18-
import static org.mockito.Matchers.*;
19-
import static org.mockito.Mockito.*;
18+
import static org.mockito.Matchers.any;
19+
import static org.mockito.Mockito.mock;
20+
import static org.mockito.Mockito.times;
21+
import static org.mockito.Mockito.verify;
2022

2123
import java.util.Arrays;
2224

@@ -30,7 +32,7 @@ public class OperatorFromIterableTest {
3032

3133
@Test
3234
public void testIterable() {
33-
Observable<String> observable = Observable.create(new OperatorFromIterable<String>(Arrays.<String> asList("one", "two", "three")));
35+
Observable<String> observable = Observable.create(new OnSubscribeFromIterable<String>(Arrays.<String> asList("one", "two", "three")));
3436

3537
@SuppressWarnings("unchecked")
3638
Observer<String> observer = mock(Observer.class);
@@ -41,7 +43,7 @@ public void testIterable() {
4143
verify(observer, Mockito.never()).onError(any(Throwable.class));
4244
verify(observer, times(1)).onCompleted();
4345
}
44-
46+
4547
@Test
4648
public void testObservableFromIterable() {
4749
Observable<String> observable = Observable.from(Arrays.<String> asList("one", "two", "three"));

0 commit comments

Comments
 (0)