From 243e624c8e932f756c226dcf0797d95951fa091b Mon Sep 17 00:00:00 2001 From: Joachim Hofer Date: Thu, 12 Sep 2013 15:14:34 +0200 Subject: [PATCH] added javadoc comments to Observable.distinct --- rxjava-core/src/main/java/rx/Observable.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rxjava-core/src/main/java/rx/Observable.java b/rxjava-core/src/main/java/rx/Observable.java index b286b11d51..47ddc5c927 100644 --- a/rxjava-core/src/main/java/rx/Observable.java +++ b/rxjava-core/src/main/java/rx/Observable.java @@ -2926,10 +2926,26 @@ public Observable filter(Func1 predicate) { return create(OperationFilter.filter(this, predicate)); } + /** + * Returns an Observable that forwards all distinct items emitted from the source Observable. + * + * @return an Observable of distinct items + * @see MSDN: Observable.distinct + */ public Observable distinct() { return create(OperationDistinct.distinct(this)); } + /** + * Returns an Observable that forwards all items emitted from the source Observable that are distinct according to + * a key selector function. + * + * @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 + * @return an Observable of distinct items + * @see MSDN: Observable.distinct + */ public Observable distinct(Func1 keySelector) { return create(OperationDistinct.distinct(this, keySelector)); }