Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class OperatorDebounceWithTime<T>

extends Object
implements Observable.Operator<T, T>
Class Inheritance
All Implemented Interfaces
rx.Observable.Operator, rx.functions.Func1, rx.functions.Function
Type Parameters
<T>
the value type
Imports
java.util.concurrent.TimeUnit, rx.*, .Observable.Operator, .Scheduler.Worker, rx.exceptions.Exceptions, rx.functions.Action0, rx.observers.SerializedSubscriber, rx.subscriptions.SerialSubscription

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 and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
OperatorDebounceWithTime.DebounceState<
the value type
T
>

Tracks the last value to be emitted and manages completion.

Field Summary

Modifier and TypeField and Description
pack-priv final Scheduler
pack-priv final long
pack-priv final TimeUnit

Constructor Summary

AccessConstructor and Description
public
OperatorDebounceWithTime(long
How long each event has to be the 'last event' before it gets published.
timeout
,
TimeUnit
The unit of time for the specified timeout.
unit
,
Scheduler
The Scheduler to use internally to manage the timers which handle timeout for each event.
scheduler
)

Method Summary

Modifier and TypeMethod and Description
public Subscriber<? super T>
call(final Subscriber<? super T> child)

Implements rx.functions.Func1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

schedulerback to summary
pack-priv final Scheduler scheduler
timeoutback to summary
pack-priv final long timeout
unitback to summary
pack-priv final TimeUnit unit

Constructor Detail

OperatorDebounceWithTimeback to summary
public OperatorDebounceWithTime(long timeout, TimeUnit unit, Scheduler scheduler)
Parameters
timeout:long

How long each event has to be the 'last event' before it gets published.

unit:TimeUnit

The unit of time for the specified timeout.

scheduler:Scheduler

The Scheduler to use internally to manage the timers which handle timeout for each event.

Method Detail

callback to summary
public Subscriber<? super T> call(final Subscriber<? super T> child)

Implements rx.functions.Func1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OperatorDebounceWithTime.DebounceState<T>

extends Object
Class Inheritance
Type Parameters
<T>
the value type

Tracks the last value to be emitted and manages completion.

Field Summary

Modifier and TypeField and Description
pack-priv boolean
emitting

Guarded by this.

pack-priv boolean
hasValue

Guarded by this.

pack-priv int
index

Guarded by this.

pack-priv boolean
terminate

Guarded by this.

pack-priv T
value

Guarded by this.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public void
emit(int index, Subscriber<T> onNextAndComplete, Subscriber<?> onError)

public void
emitAndComplete(Subscriber<T> onNextAndComplete, Subscriber<?> onError)

public synchronized int
next(T value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

emittingback to summary
pack-priv boolean emitting

Guarded by this.

hasValueback to summary
pack-priv boolean hasValue

Guarded by this.

indexback to summary
pack-priv int index

Guarded by this.

terminateback to summary
pack-priv boolean terminate

Guarded by this.

valueback to summary
pack-priv T value

Guarded by this.

Constructor Detail

DebounceStateback to summary
pack-priv DebounceState()

Method Detail

clearback to summary
public synchronized void clear()
emitback to summary
public void emit(int index, Subscriber<T> onNextAndComplete, Subscriber<?> onError)
emitAndCompleteback to summary
public void emitAndComplete(Subscriber<T> onNextAndComplete, Subscriber<?> onError)
nextback to summary
public synchronized int next(T value)