Debounce

The debounce() function filters out items emitted by the Observable that are rapidly followed by another emitted item; it only emits an item from Observable if a particular timespan has passed without it emitting another item.

Like sample() and timeout(), debounce() uses the TimeUnit object to specify the time interval.

The next figure shows how every time a new item is emitted from the Observable, debounce() starts its internal timer, and if no new item is emitted during this timespan, the last item is emitted by the new Observable:

Debounce
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.31.67