RxJava
rx.operators
Class OperationLast
java.lang.Object
rx.operators.OperationLast
public class OperationLast
- extends java.lang.Object
Emit an Observable with the last emitted item
or onError(new IllegalArgumentException("Sequence contains no elements")) if no elements received.
|
Method Summary |
static
|
last(Observable<? extends T> sequence)
Accepts a sequence and returns a sequence that is the last emitted item
or an error if no items are emitted (empty sequence). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OperationLast
public OperationLast()
last
public static <T> Observable.OnSubscribeFunc<T> last(Observable<? extends T> sequence)
- Accepts a sequence and returns a sequence that is the last emitted item
or an error if no items are emitted (empty sequence).
- Type Parameters:
T - the type of the sequence.- Parameters:
sequence - the input sequence.
- Returns:
- a sequence containing the last emitted item or that has onError invoked on it if no items