Skip to content

Commit

Permalink
Added variance to selector functions
Browse files Browse the repository at this point in the history
  • Loading branch information
akarnokd committed Jan 11, 2014
1 parent 900dca8 commit 0ad8980
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -5250,7 +5250,7 @@ public ConnectableObservable<T> publish(T initialValue) {
* selector on a connectable observable sequence that shares a single
* subscription to the underlying sequence.
*/
public <R> Observable<R> publish(Func1<Observable<T>, Observable<R>> selector) {
public <R> Observable<R> publish(Func1<? super Observable<T>, ? extends Observable<R>> selector) {
return multicast(new Func0<Subject<T, T>>() {
@Override
public Subject<T, T> call() {
Expand All @@ -5270,7 +5270,7 @@ public Subject<T, T> call() {
* @param initialValue the initial value of the underlying BehaviorSubject
* @return an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue
*/
public <R> Observable<R> publish(Func1<Observable<T>, Observable<R>> selector, final T initialValue) {
public <R> Observable<R> publish(Func1<? super Observable<T>, ? extends Observable<R>> selector, final T initialValue) {
return multicast(new Func0<Subject<T, T>>() {
@Override
public Subject<T, T> call() {
Expand Down Expand Up @@ -5307,7 +5307,7 @@ public ConnectableObservable<T> publishLast() {
* subscription to the underlying sequence containing only the last
* notification.
*/
public <R> Observable<R> publishLast(Func1<Observable<T>, Observable<R>> selector) {
public <R> Observable<R> publishLast(Func1<? super Observable<T>, ? extends Observable<R>> selector) {
return multicast(new Func0<Subject<T, T>>() {
@Override
public Subject<T, T> call() {
Expand Down

0 comments on commit 0ad8980

Please sign in to comment.