Skip to content

Commit b75b37c

Browse files
Update javadoc for throttleLast
1 parent 87e766d commit b75b37c

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

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

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,30 +1811,28 @@ public static Observable<Long> interval(long interval, TimeUnit unit, Scheduler
18111811
}
18121812

18131813
/**
1814-
* Throttles the {@link Observable} by dropping values which are followed by newer values before the timer has expired.
1815-
*
1816-
* @param timeout
1817-
* The time each value has to be 'the most recent' of the {@link Observable} to ensure that it's not dropped.
1814+
* Throttles to last value in each window.
18181815
*
1816+
* @param windowDuration
1817+
* Duration of windows within with the first value will be chosen.
18191818
* @param unit
1820-
* The {@link TimeUnit} for the timeout.
1821-
*
1822-
* @return An {@link Observable} which filters out values which are too quickly followed up with newer values.
1819+
* The unit of time for the specified timeout.
1820+
* @return Observable which performs the throttle operation.
18231821
*/
18241822
public Observable<T> throttleLast(long timeout, TimeUnit unit) {
18251823
return create(OperationThrottleLast.throttleLast(this, timeout, unit));
18261824
}
18271825

18281826
/**
1829-
* Throttles the {@link Observable} by dropping values which are followed by newer values before the timer has expired.
1827+
* Throttles to last value in each window.
18301828
*
1831-
* @param timeout
1832-
* The time each value has to be 'the most recent' of the {@link Observable} to ensure that it's not dropped.
1829+
* @param windowDuration
1830+
* Duration of windows within with the first value will be chosen.
18331831
* @param unit
1834-
* The {@link TimeUnit} for the timeout.
1832+
* The unit of time for the specified timeout.
18351833
* @param scheduler
1836-
* The {@link Scheduler} to use when timing incoming values.
1837-
* @return An {@link Observable} which filters out values which are too quickly followed up with newer values.
1834+
* The {@link Scheduler} to use internally to manage the timers which handle timeout for each event.
1835+
* @return Observable which performs the throttle operation.
18381836
*/
18391837
public Observable<T> throttleLast(long timeout, TimeUnit unit, Scheduler scheduler) {
18401838
return create(OperationThrottleLast.throttleLast(this, timeout, unit, scheduler));

0 commit comments

Comments
 (0)