Skip to content

Commit

Permalink
Merge pull request ReactiveX#400 from benjchristensen/distinct-compar…
Browse files Browse the repository at this point in the history
…ator

Removing 'comparator` overloads of `distinct`
  • Loading branch information
benjchristensen committed Sep 21, 2013
2 parents 42f967e + e5e9626 commit e37ac40
Showing 1 changed file with 0 additions and 66 deletions.
66 changes: 0 additions & 66 deletions rxjava-core/src/main/java/rx/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -3046,39 +3046,6 @@ public <U> Observable<T> distinctUntilChanged(Func1<? super T, ? extends U> keyS
return create(OperationDistinctUntilChanged.distinctUntilChanged(this, keySelector));
}

/**
* Returns an Observable that forwards all items emitted from the source Observable that are sequentially
* distinct according to a comparator.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinctUntilChanged.png">
*
* @param equalityComparator
* a comparator for deciding whether two emitted items are equal or not
* @return an Observable of sequentially distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229776%28v=vs.103%29.aspx">MSDN: Observable.distinctUntilChanged</a>
*/
public <U> Observable<T> distinctUntilChanged(Comparator<T> equalityComparator) {
return create(OperationDistinctUntilChanged.distinctUntilChanged(this, equalityComparator));
}

/**
* Returns an Observable that forwards all items emitted from the source Observable that are sequentially
* distinct according to a key selector function and a comparator.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinctUntilChanged.key.png">
*
* @param keySelector
* a function that projects an emitted item to a key value which is used for deciding whether an item is sequentially
* distinct from another one or not
* @param equalityComparator
* a comparator for deciding whether two emitted item keys are equal or not
* @return an Observable of sequentially distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229533%28v=vs.103%29.aspx">MSDN: Observable.distinctUntilChanged</a>
*/
public <U> Observable<T> distinctUntilChanged(Func1<? super T, ? extends U> keySelector, Comparator<U> equalityComparator) {
return create(OperationDistinctUntilChanged.distinctUntilChanged(this, keySelector, equalityComparator));
}

/**
* Returns an Observable that forwards all distinct items emitted from the source Observable.
* <p>
Expand All @@ -3091,21 +3058,6 @@ public Observable<T> distinct() {
return create(OperationDistinct.distinct(this));
}

/**
* Returns an Observable that forwards all items emitted from the source Observable that are distinct according
* to a comparator.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinct.png">
*
* @param equalityComparator
* a comparator for deciding whether two emitted items are equal or not
* @return an Observable of distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211630(v=vs.103).aspx">MSDN: Observable.distinct</a>
*/
public <U> Observable<T> distinct(Comparator<T> equalityComparator) {
return create(OperationDistinct.distinct(this, equalityComparator));
}

/**
* Returns an Observable that forwards all items emitted from the source Observable that are distinct according
* to a key selector function.
Expand All @@ -3122,24 +3074,6 @@ public <U> Observable<T> distinct(Func1<? super T, ? extends U> keySelector) {
return create(OperationDistinct.distinct(this, keySelector));
}

/**
* Returns an Observable that forwards all items emitted from the source Observable that are distinct according
* to a key selector function and a comparator.
* <p>
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinct.key.png">
*
* @param keySelector
* a function that projects an emitted item to a key value which is used for deciding whether an item is
* distinct from another one or not
* @param equalityComparator
* a comparator for deciding whether two emitted item keys are equal or not
* @return an Observable of distinct items
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229050(v=vs.103).aspx">MSDN: Observable.distinct</a>
*/
public <U> Observable<T> distinct(Func1<? super T, ? extends U> keySelector, Comparator<U> equalityComparator) {
return create(OperationDistinct.distinct(this, keySelector, equalityComparator));
}

/**
* Returns the element at a specified index in a sequence.
*
Expand Down

0 comments on commit e37ac40

Please sign in to comment.