T - the element typepublic static class Take.First<T> extends java.lang.Object implements Observable<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
count |
protected Observable<? extends T> |
source |
| Constructor and Description |
|---|
First(Observable<? extends T> source,
int count)
Construction.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.Closeable |
register(Observer<? super T> observer)
Registers an observer for the notification of Ts.
|
protected final Observable<? extends T> source
protected final int count
public First(Observable<? extends T> source, int count)
source - the source of Tscount - the number of elements to relay, setting
it to zero will finish the output after the reception of
the first event.@Nonnull
public java.io.Closeable register(@Nonnull
Observer<? super T> observer)
Observableregister in interface Observable<T>observer - the observer of Ts or any supertype of it