Debounce
only emit an item from an Observable if a particular timespan has passed without it emitting another item
The Debounce operator filters out items emitted by the source Observable that are rapidly followed by another emitted item.
----------------------------------------------------------------------------
Observable.just(1,2,3,4,5).debounce(300, TimeUnit.MILLISECONDS).subscribe(System.out::println);
---------------------------------------------------------------------------
22
No comments:
Post a Comment