RxJava



rx.operators
Class OperationSkipLast

java.lang.Object
  extended by rx.operators.OperationSkipLast

public class OperationSkipLast
extends java.lang.Object

Bypasses a specified number of elements at the end of an observable sequence.


Constructor Summary
OperationSkipLast()
           
 
Method Summary
static
<T> Observable.OnSubscribeFunc<T>
skipLast(Observable<? extends T> source, int count)
          Bypasses a specified number of elements at the end of an observable sequence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationSkipLast

public OperationSkipLast()
Method Detail

skipLast

public static <T> Observable.OnSubscribeFunc<T> skipLast(Observable<? extends T> source,
                                                         int count)
Bypasses a specified number of elements at the end of an observable sequence.

This operator accumulates a queue with a length enough to store the first count elements. As more elements are received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed.

Parameters:
source - the source sequence.
count - number of elements to bypass at the end of the source sequence.
Returns:
An observable sequence containing the source sequence elements except for the bypassed ones at the end.
Throws:
java.lang.IndexOutOfBoundsException - count is less than zero.