RxJava
rx.operators
Class OperationMap
java.lang.Object
rx.operators.OperationMap
public final class OperationMap
- extends java.lang.Object
|
Method Summary |
static
|
map(Observable<T> sequence,
Func1<T,R> func)
Accepts a sequence and a transformation function. |
static
|
mapMany(Observable<T> sequence,
Func1<T,Observable<R>> func)
Accepts a sequence of observable sequences and a transformation function. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OperationMap
public OperationMap()
map
public static <T,R> Func1<Observer<R>,Subscription> map(Observable<T> sequence,
Func1<T,R> func)
- Accepts a sequence and a transformation function. Returns a sequence that is the result of
applying the transformation function to each item in the sequence.
- Type Parameters:
T - the type of the input sequence.R - the type of the output sequence.- Parameters:
sequence - the input sequence.func - a function to apply to each item in the sequence.
- Returns:
- a sequence that is the result of applying the transformation function to each item in the input sequence.
mapMany
public static <T,R> Func1<Observer<R>,Subscription> mapMany(Observable<T> sequence,
Func1<T,Observable<R>> func)
- Accepts a sequence of observable sequences and a transformation function. Returns a flattened sequence that is the result of
applying the transformation function to each item in the sequence of each observable sequence.
The closure should return an Observable which will then be merged.
- Type Parameters:
T - the type of the input sequence.R - the type of the output sequence.- Parameters:
sequence - the input sequence.func - a function to apply to each item in the sequence.
- Returns:
- a sequence that is the result of applying the transformation function to each item in the input sequence.