Package rx.internal.operators
Class OperatorDebounceWithTime<T>
- java.lang.Object
-
- rx.internal.operators.OperatorDebounceWithTime<T>
-
- Type Parameters:
T- the value type
- All Implemented Interfaces:
Func1<Subscriber<? super T>,Subscriber<? super T>>,Function,Observable.Operator<T,T>
public final class OperatorDebounceWithTime<T> extends java.lang.Object implements Observable.Operator<T,T>
This operation filters out events which are published too quickly in succession. This is done by dropping events which are followed up by other events before a specified timer has expired. If the timer expires and no follow up event was published (yet) the last received event is published.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classOperatorDebounceWithTime.DebounceState<T>Tracks the last value to be emitted and manages completion.
-
Constructor Summary
Constructors Constructor Description OperatorDebounceWithTime(long timeout, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subscriber<? super T>call(Subscriber<? super T> child)
-
-
-
Field Detail
-
timeout
final long timeout
-
unit
final java.util.concurrent.TimeUnit unit
-
scheduler
final Scheduler scheduler
-
-
Constructor Detail
-
OperatorDebounceWithTime
public OperatorDebounceWithTime(long timeout, java.util.concurrent.TimeUnit unit, Scheduler scheduler)- Parameters:
timeout- How long each event has to be the 'last event' before it gets published.unit- The unit of time for the specified timeout.scheduler- TheSchedulerto use internally to manage the timers which handle timeout for each event.
-
-
Method Detail
-
call
public Subscriber<? super T> call(Subscriber<? super T> child)
- Specified by:
callin interfaceFunc1<Subscriber<? super T>,Subscriber<? super T>>
-
-