Skip to content

Commit e5e9626

Browse files
Removing 'comparator overloads of distinct`
Removing these fairly recently added overloads as they turn out to not be the best approach. Discussion ongoing as to how to implement them at ReactiveX#395
1 parent 42f967e commit e5e9626

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

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

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,39 +3046,6 @@ public <U> Observable<T> distinctUntilChanged(Func1<? super T, ? extends U> keyS
30463046
return create(OperationDistinctUntilChanged.distinctUntilChanged(this, keySelector));
30473047
}
30483048

3049-
/**
3050-
* Returns an Observable that forwards all items emitted from the source Observable that are sequentially
3051-
* distinct according to a comparator.
3052-
* <p>
3053-
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinctUntilChanged.png">
3054-
*
3055-
* @param equalityComparator
3056-
* a comparator for deciding whether two emitted items are equal or not
3057-
* @return an Observable of sequentially distinct items
3058-
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229776%28v=vs.103%29.aspx">MSDN: Observable.distinctUntilChanged</a>
3059-
*/
3060-
public <U> Observable<T> distinctUntilChanged(Comparator<T> equalityComparator) {
3061-
return create(OperationDistinctUntilChanged.distinctUntilChanged(this, equalityComparator));
3062-
}
3063-
3064-
/**
3065-
* Returns an Observable that forwards all items emitted from the source Observable that are sequentially
3066-
* distinct according to a key selector function and a comparator.
3067-
* <p>
3068-
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinctUntilChanged.key.png">
3069-
*
3070-
* @param keySelector
3071-
* a function that projects an emitted item to a key value which is used for deciding whether an item is sequentially
3072-
* distinct from another one or not
3073-
* @param equalityComparator
3074-
* a comparator for deciding whether two emitted item keys are equal or not
3075-
* @return an Observable of sequentially distinct items
3076-
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229533%28v=vs.103%29.aspx">MSDN: Observable.distinctUntilChanged</a>
3077-
*/
3078-
public <U> Observable<T> distinctUntilChanged(Func1<? super T, ? extends U> keySelector, Comparator<U> equalityComparator) {
3079-
return create(OperationDistinctUntilChanged.distinctUntilChanged(this, keySelector, equalityComparator));
3080-
}
3081-
30823049
/**
30833050
* Returns an Observable that forwards all distinct items emitted from the source Observable.
30843051
* <p>
@@ -3091,21 +3058,6 @@ public Observable<T> distinct() {
30913058
return create(OperationDistinct.distinct(this));
30923059
}
30933060

3094-
/**
3095-
* Returns an Observable that forwards all items emitted from the source Observable that are distinct according
3096-
* to a comparator.
3097-
* <p>
3098-
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinct.png">
3099-
*
3100-
* @param equalityComparator
3101-
* a comparator for deciding whether two emitted items are equal or not
3102-
* @return an Observable of distinct items
3103-
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211630(v=vs.103).aspx">MSDN: Observable.distinct</a>
3104-
*/
3105-
public <U> Observable<T> distinct(Comparator<T> equalityComparator) {
3106-
return create(OperationDistinct.distinct(this, equalityComparator));
3107-
}
3108-
31093061
/**
31103062
* Returns an Observable that forwards all items emitted from the source Observable that are distinct according
31113063
* to a key selector function.
@@ -3122,24 +3074,6 @@ public <U> Observable<T> distinct(Func1<? super T, ? extends U> keySelector) {
31223074
return create(OperationDistinct.distinct(this, keySelector));
31233075
}
31243076

3125-
/**
3126-
* Returns an Observable that forwards all items emitted from the source Observable that are distinct according
3127-
* to a key selector function and a comparator.
3128-
* <p>
3129-
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/distinct.key.png">
3130-
*
3131-
* @param keySelector
3132-
* a function that projects an emitted item to a key value which is used for deciding whether an item is
3133-
* distinct from another one or not
3134-
* @param equalityComparator
3135-
* a comparator for deciding whether two emitted item keys are equal or not
3136-
* @return an Observable of distinct items
3137-
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229050(v=vs.103).aspx">MSDN: Observable.distinct</a>
3138-
*/
3139-
public <U> Observable<T> distinct(Func1<? super T, ? extends U> keySelector, Comparator<U> equalityComparator) {
3140-
return create(OperationDistinct.distinct(this, keySelector, equalityComparator));
3141-
}
3142-
31433077
/**
31443078
* Returns the element at a specified index in a sequence.
31453079
*

0 commit comments

Comments
 (0)