File tree 1 file changed +16
-0
lines changed
rxjava-core/src/main/java/rx 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -2926,10 +2926,26 @@ public Observable<T> filter(Func1<? super T, Boolean> predicate) {
2926
2926
return create (OperationFilter .filter (this , predicate ));
2927
2927
}
2928
2928
2929
+ /**
2930
+ * Returns an Observable that forwards all distinct items emitted from the source Observable.
2931
+ *
2932
+ * @return an Observable of distinct items
2933
+ * @see <a href="http://msdn.microsoft.com/en-us/library/hh229764%28v=vs.103%29.aspx">MSDN: Observable.distinct</a>
2934
+ */
2929
2935
public Observable <T > distinct () {
2930
2936
return create (OperationDistinct .distinct (this ));
2931
2937
}
2932
2938
2939
+ /**
2940
+ * Returns an Observable that forwards all items emitted from the source Observable that are distinct according to
2941
+ * a key selector function.
2942
+ *
2943
+ * @param keySelector
2944
+ * a function that projects an emitted item to a key value which is used for deciding whether an item is
2945
+ * distinct from another one or not
2946
+ * @return an Observable of distinct items
2947
+ * @see <a href="http://msdn.microsoft.com/en-us/library/hh244310%28v=vs.103%29.aspx">MSDN: Observable.distinct</a>
2948
+ */
2933
2949
public <U > Observable <T > distinct (Func1 <? super T , ? extends U > keySelector ) {
2934
2950
return create (OperationDistinct .distinct (this , keySelector ));
2935
2951
}
You can’t perform that action at this time.
0 commit comments