T - The class for the Observablepublic class ObservableBuilder<T>
extends java.lang.Object
| Constructor and Description |
|---|
ObservableBuilder() |
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<T> |
build()
Returns an Observable the performs all event's given to the builder when subscribed to
|
rx.Observable<T> |
complete()
Builds an Observable that performs all previous events and lastly terminates by telling it's subscribers that it completed
|
ObservableBuilder<T> |
emit(T item)
Adds a new event to the observable that emits the given item
|
rx.Observable<T> |
error(java.lang.Throwable error)
Builds an Observable that performs all previous events and lastly terminates with the given error
|
ObservableBuilder<T> |
perform(rx.functions.Action1<rx.Subscriber<? super T>> action)
Adds a new event to the observable that performs the specified action on the subscription
|
ObservableBuilder<T> |
perform(java.lang.Runnable runnable)
Adds a new event to the observable that runs the specified runnable
|
ObservableBuilder<T> |
sleep(long mills)
Adds a new event to the observable that will delay all further event's by the specified amount of time
|
public ObservableBuilder<T> emit(T item)
item - The item to emitpublic rx.Observable<T> error(java.lang.Throwable error)
error - The errorpublic rx.Observable<T> complete()
public ObservableBuilder<T> sleep(long mills)
mills - How long to delay in millisecondspublic ObservableBuilder<T> perform(rx.functions.Action1<rx.Subscriber<? super T>> action)
action - The action to be performedpublic ObservableBuilder<T> perform(java.lang.Runnable runnable)
runnable - The runnable to runpublic rx.Observable<T> build()