src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Observable<T> debounce(long timeout, TimeUnit unit, Scheduler scheduler) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return RxJavaPlugins.onAssembly(new ObservableDebounceTimed<T>(this, timeout, unit, scheduler));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final Observable<T> debounce(long timeout, TimeUnit unit, Scheduler scheduler) {
        ObjectHelper.requireNonNull(unit, "unit is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return RxJavaPlugins.onAssembly(new ObservableDebounceTimed<T>(this, timeout, unit, scheduler));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final Observable < T > debounce ( long timeout , TimeUnit unit , Scheduler scheduler ) { ObjectHelper . requireNonNull ( unit , "unit is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; return RxJavaPlugins . onAssembly ( new ObservableDebounceTimed < T > ( this , timeout , unit , scheduler ) ) ; }
Returns an Observable that mirrors the source ObservableSource, except that it drops items emitted by the
source ObservableSource that are followed by newer items before a timeout value expires on a specified
Scheduler. The timer resets on each emission.
<p>
<em>Note:</em> If items keep being emitted by the source ObservableSource faster than the timeout then no items
will be emitted by the resulting ObservableSource.
<p>
<img width="640" height="310" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/debounce.s.png" alt="">
<p>
Delivery of the item after the grace period happens on the given {@code Scheduler}'s
{@code Worker} which if takes too long, a newer item may arrive from the upstream, causing the
{@code Worker}'s task to get disposed, which may also interrupt any downstream blocking operation
(yielding an {@code InterruptedException}). It is recommended processing items
that may take long time to be moved to another thread via {@link #observeOn} applied after
{@code debounce} itself.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>You specify which {@link Scheduler} this operator will use.</dd>
</dl>

@param timeout
the time each item has to be "the most recent" of those emitted by the source ObservableSource to
ensure that it's not dropped
@param unit
the unit of time for the specified {@code timeout}
@param scheduler
the {@link Scheduler} to use internally to manage the timers that handle the timeout for each
item
@return an Observable that filters out items from the source ObservableSource that are too quickly followed by
newer items
@see <a href="http://reactivex.io/documentation/operators/debounce.html">ReactiveX operators documentation: Debounce</a>
@see #throttleWithTimeout(long, TimeUnit, Scheduler)
Returns an Observable that mirrors the source ObservableSource except that it drops items emitted by the source ObservableSource that are followed by newer items before a timeout value expires on a specified Scheduler . The timer resets on each emission . <p > <em > Note : < / em > If items keep being emitted by the source ObservableSource faster than the timeout then no items will be emitted by the resulting ObservableSource . <p > <img width = 640 height = 310 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / debounce . s . png alt = > <p > Delivery of the item after the grace period happens on the given { @code Scheduler } s { @code Worker } which if takes too long a newer item may arrive from the upstream causing the { @code Worker } s task to get disposed which may also interrupt any downstream blocking operation ( yielding an { @code InterruptedException } ) . It is recommended processing items that may take long time to be moved to another thread via { @link #observeOn } applied after { @code debounce } itself . <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > You specify which { @link Scheduler } this operator will use . < / dd > < / dl >