Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing 'comparator overloads of distinct` #400

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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