Skip to content

Commit

Permalink
Merge branch 'to-map' of git://github.com/zsxwing/RxJava into merge-prs
Browse files Browse the repository at this point in the history
Conflicts:
	rxjava-core/src/main/java/rx/Observable.java
  • Loading branch information
benjchristensen committed Apr 29, 2014
2 parents 03eea96 + 483662f commit 52f4005
Show file tree
Hide file tree
Showing 5 changed files with 293 additions and 360 deletions.
8 changes: 4 additions & 4 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
import rx.operators.OperationTakeWhile;
import rx.operators.OperationThrottleFirst;
import rx.operators.OperationTimeInterval;
import rx.operators.OperationToMap;
import rx.operators.OperatorToMap;
import rx.operators.OperationUsing;
import rx.operators.OperationWindow;
import rx.operators.OperatorAll;
Expand Down Expand Up @@ -7180,7 +7180,7 @@ public final Observable<List<T>> toList() {
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229137.aspx">MSDN: Observable.ToDictionary</a>
*/
public final <K> Observable<Map<K, T>> toMap(Func1<? super T, ? extends K> keySelector) {
return create(OperationToMap.toMap(this, keySelector));
return lift(new OperatorToMap<T, K, T>(keySelector, Functions.<T>identity()));
}

/**
Expand All @@ -7202,7 +7202,7 @@ public final <K> Observable<Map<K, T>> toMap(Func1<? super T, ? extends K> keySe
* @see <a href="http://msdn.microsoft.com/en-us/library/hh212075.aspx">MSDN: Observable.ToDictionary</a>
*/
public final <K, V> Observable<Map<K, V>> toMap(Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends V> valueSelector) {
return create(OperationToMap.toMap(this, keySelector, valueSelector));
return lift(new OperatorToMap<T, K, V>(keySelector, valueSelector));
}

/**
Expand All @@ -7222,7 +7222,7 @@ public final <K, V> Observable<Map<K, V>> toMap(Func1<? super T, ? extends K> ke
* @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#wiki-tomap-and-tomultimap">RxJava Wiki: toMap()</a>
*/
public final <K, V> Observable<Map<K, V>> toMap(Func1<? super T, ? extends K> keySelector, Func1<? super T, ? extends V> valueSelector, Func0<? extends Map<K, V>> mapFactory) {
return create(OperationToMap.toMap(this, keySelector, valueSelector, mapFactory));
return lift(new OperatorToMap<T, K, V>(keySelector, valueSelector, mapFactory));
}

/**
Expand Down
171 changes: 0 additions & 171 deletions rxjava-core/src/main/java/rx/operators/OperationToMap.java

This file was deleted.

Loading

0 comments on commit 52f4005

Please sign in to comment.