Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class OperatorTakeLast<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.ArrayDeque, java.util.concurrent.atomic.AtomicLong, rx.*, .Observable.Operator, rx.functions.Func1

Returns an Observable that emits the at most the last count items emitted by the source Observable.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final int

Constructor Summary

AccessConstructor and Description
public
OperatorTakeLast(int count)

Method Summary

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

Implements rx.functions.Func1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
pack-priv final int count

Constructor Detail

OperatorTakeLastback to summary
public OperatorTakeLast(int count)

Method Detail

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

Implements rx.functions.Func1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OperatorTakeLast.TakeLastSubscriber<T>

extends Subscriber<T>
implements Func1<Object, T>
Class Inheritance
All Implemented Interfaces
rx.functions.Func1, rx.functions.Function

Field Summary

Modifier and TypeField and Description
pack-priv final Subscriber<? super T>
pack-priv final int
pack-priv final ArrayDeque<Object>
pack-priv final AtomicLong

Constructor Summary

AccessConstructor and Description
public
TakeLastSubscriber(Subscriber<? super T> actual, int count)

Method Summary

Modifier and TypeMethod and Description
public T
public void
onCompleted()

Implements rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
onError(Throwable
the exception encountered by the Observable
e
)

Implements rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
pack-priv void
requestMore(long n)

Inherited from rx.Subscriber:
addisUnsubscribedonStartrequestsetProducerunsubscribe

Field Detail

actualback to summary
pack-priv final Subscriber<? super T> actual
countback to summary
pack-priv final int count
queueback to summary
pack-priv final ArrayDeque<Object> queue
requestedback to summary
pack-priv final AtomicLong requested

Hides rx.Subscriber.requested.

Constructor Detail

TakeLastSubscriberback to summary
public TakeLastSubscriber(Subscriber<? super T> actual, int count)

Method Detail

callback to summary
public T call(Object t)

Implements rx.functions.Func1.call.

Annotations
@Override
onCompletedback to summary
public void onCompleted()

Implements rx.Observer.onCompleted.

Doc from rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

Annotations
@Override
onErrorback to summary
public void onError(Throwable e)

Implements rx.Observer.onError.

Doc from rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onCompleted.

Parameters
e:Throwable

the exception encountered by the Observable

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements rx.Observer.onNext.

Doc from rx.Observer.onNext.

Provides the Observer with a new item to observe.

The Observable may call this method 0 or more times.

The Observable will not call this method again after it calls either onCompleted or onError.

Parameters
t:T

the item emitted by the Observable

Annotations
@Override
requestMoreback to summary
pack-priv void requestMore(long n)