Skip to content

Commit e3429ca

Browse files
Merge pull request ReactiveX#569 from Netflix/docs
javadoc improvements (groupJoin, groupByUntil, timestamp w/scheduler)
2 parents 0026ea4 + 8114d81 commit e3429ca

File tree

1 file changed

+41
-20
lines changed

1 file changed

+41
-20
lines changed

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

Lines changed: 41 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2203,6 +2203,7 @@ public Observable<T> throttleLast(long intervalDuration, TimeUnit unit, Schedule
22032203
* @return an Observable that emits timestamped items from the source
22042204
* Observable
22052205
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#timestamp">RxJava Wiki: timestamp()</a>
2206+
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229003.aspx">MSDN: Observable.Timestamp</a>
22062207
*/
22072208
public Observable<Timestamped<T>> timestamp() {
22082209
return create(OperationTimestamp.timestamp(this));
@@ -2211,11 +2212,14 @@ public Observable<Timestamped<T>> timestamp() {
22112212
/**
22122213
* Wraps each item emitted by a source Observable in a {@link Timestamped}
22132214
* object with timestamps provided by the given Scheduler.
2215+
* <p>
2216+
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/timestamp.s.png">
22142217
*
22152218
* @param scheduler the {@link Scheduler} to use as a time source.
22162219
* @return an Observable that emits timestamped items from the source
22172220
* Observable with timestamps provided by the given Scheduler
2218-
* @see <a href='http://msdn.microsoft.com/en-us/library/hh229003.aspx'>MSDN: Observable.Timestamp</a>
2221+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#timestamp">RxJava Wiki: timestamp()</a>
2222+
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229003.aspx">MSDN: Observable.Timestamp</a>
22192223
*/
22202224
public Observable<Timestamped<T>> timestamp(Scheduler scheduler) {
22212225
return create(OperationTimestamp.timestamp(this, scheduler));
@@ -5115,6 +5119,8 @@ public <K> Observable<GroupedObservable<K, T>> groupBy(final Func1<? super T, ?
51155119

51165120
/**
51175121
* Return an Observable which correlates two sequences when they overlap and groups the results.
5122+
* <p>
5123+
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/groupJoin.png">
51185124
*
51195125
* @param right the other Observable to correlate values of this observable to
51205126
* @param leftDuration function that returns an Observable which indicates the duration of
@@ -5126,6 +5132,7 @@ public <K> Observable<GroupedObservable<K, T>> groupBy(final Func1<? super T, ?
51265132
* @return an Observable that emits grouped values based on overlapping durations from this and
51275133
* another Observable
51285134
*
5135+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Combining-Observables#join-and-groupjoin">RxJava Wiiki: groupJoin</a>
51295136
* @see <a href="http://msdn.microsoft.com/en-us/library/hh244235.aspx">MSDN: Observable.GroupJoin</a>
51305137
*/
51315138
public <T2, D1, D2, R> Observable<R> groupJoin(Observable<T2> right, Func1<? super T, ? extends Observable<D1>> leftDuration,
@@ -6165,42 +6172,56 @@ public <K, V> Observable<Map<K, Collection<V>>> toMultimap(Func1<? super T, ? ex
61656172
}
61666173

61676174
/**
6168-
* Return an Observable that skips elements from the source Observable until the secondary
6169-
* observable emits an element.
6175+
* Return an Observable that skips elements from the source Observable until
6176+
* the secondary Observable emits an element.
61706177
* <p>
61716178
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/skipUntil.png">
61726179
*
61736180
* @param other the other Observable that has to emit an element before this
61746181
* Observable's elements are relayed
6175-
* @return an Observable that skips elements from the source Observable until the secondary
6176-
* observable emits an element.
6182+
* @return an Observable that skips elements from the source Observable
6183+
* until the secondary Observable emits an element.
61776184
* @see <a href="https://github.com/Netflix/RxJava/wiki/Filtering-Observables#skipuntil">RxJava Wiki: skipUntil()</a>
6178-
* @see <a href='http://msdn.microsoft.com/en-us/library/hh229358.aspx'>MSDN: Observable.SkipUntil</a>
6185+
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229358.aspx">MSDN: Observable.SkipUntil</a>
61796186
*/
61806187
public <U> Observable<T> skipUntil(Observable<U> other) {
61816188
return create(new OperationSkipUntil<T, U>(this, other));
61826189
}
6183-
6190+
61846191
/**
6185-
* Groups the elements of an observable sequence according to a specified key selector function until the duration observable expires for the key.
6186-
* @param keySelector A function to extract the key for each element.
6187-
* @param durationSelector A function to signal the expiration of a group.
6188-
* @return A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
6189-
*
6190-
* @see <a href='http://msdn.microsoft.com/en-us/library/hh211932.aspx'>MSDN: Observable.GroupByUntil</a>
6192+
* Groups the items emitted by an Observable according to a specified key
6193+
* selector function until the duration Observable expires for the key.
6194+
* <p>
6195+
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/groupByUntil.png">
6196+
*
6197+
* @param keySelector a function to extract the key for each item
6198+
* @param durationSelector a function to signal the expiration of a group
6199+
* @return a sequence of Observable groups, each of which corresponds to a
6200+
* unique key value, containing all items that share that same
6201+
* key value
6202+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Transforming-Observables#groupby-and-groupbyuntil">RxJava Wiki: groupByUntil()</a>
6203+
* @see <a href="http://msdn.microsoft.com/en-us/library/hh211932.aspx">MSDN: Observable.GroupByUntil</a>
61916204
*/
61926205
public <TKey, TDuration> Observable<GroupedObservable<TKey, T>> groupByUntil(Func1<? super T, ? extends TKey> keySelector, Func1<? super GroupedObservable<TKey, T>, ? extends Observable<TDuration>> durationSelector) {
61936206
return groupByUntil(keySelector, Functions.<T>identity(), durationSelector);
61946207
}
61956208

61966209
/**
6197-
* Groups the elements of an observable sequence according to a specified key and value selector function until the duration observable expires for the key.
6198-
* @param keySelector A function to extract the key for each element.
6199-
* @param valueSelector A function to map each source element to an element in an onbservable group.
6200-
* @param durationSelector A function to signal the expiration of a group.
6201-
* @return A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value.
6202-
*
6203-
* @see <a href='http://msdn.microsoft.com/en-us/library/hh229433.aspx'>MSDN: Observable.GroupByUntil</a>
6210+
* Groups the items emitted by an Observable according to specified key and
6211+
* value selector functions until the duration Observable expires for the
6212+
* key.
6213+
* <p>
6214+
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/groupByUntil.png">
6215+
*
6216+
* @param keySelector a function to extract the key for each item
6217+
* @param valueSelector a function to map each source element to an item
6218+
* emitted by an Observable group
6219+
* @param durationSelector a function to signal the expiration of a group
6220+
* @return a sequence of Observable groups, each of which corresponds to a
6221+
* unique key value, containing all items that share that same key
6222+
* value
6223+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Transforming-Observables#groupby-and-groupbyuntil">RxJava Wiki: groupByUntil()</a>
6224+
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229433.aspx">MSDN: Observable.GroupByUntil</a>
62046225
*/
62056226
public <TKey, TValue, TDuration> Observable<GroupedObservable<TKey, TValue>> groupByUntil(Func1<? super T, ? extends TKey> keySelector, Func1<? super T, ? extends TValue> valueSelector, Func1<? super GroupedObservable<TKey, TValue>, ? extends Observable<TDuration>> durationSelector) {
62066227
return create(new OperationGroupByUntil<T, TKey, TValue, TDuration>(this, keySelector, valueSelector, durationSelector));

0 commit comments

Comments
 (0)