RXMapper<T> Class

  • java.lang.Object
    • rx.functions.Func1<Object, T>
      • com.microsoft.azure.management.resources.fluentcore.utils.RXMapper<T>

Type Parameters

T

the type to emit as Observable

public class RXMapper

An internal utility class representing an RX function returning the provided type instance from a call with an arbitrary parameter.

Method Summary

Modifier and Type Method and Description
T call(Object t)
static<T> Observable<T> map(Observable<?> fromObservable, final T toValue)

Shortcut for mapping the output of an arbitrary observable to one returning an instance of a specific type, using the IO scheduler.

Observable<Void> mapToVoid(Observable<?> fromObservable)

Shortcut for mapping an arbitrary observable to void, using the IO scheduler.

Method Details

call

public T call(Object t)

Parameters:

t

map

public static static Observable map(Observable fromObservable, final T toValue)

Shortcut for mapping the output of an arbitrary observable to one returning an instance of a specific type, using the IO scheduler.

Parameters:

fromObservable - the source observable
toValue - the value to emit to the observer

Returns:

an observable emitting the specified value

mapToVoid

public static Observable mapToVoid(Observable fromObservable)

Shortcut for mapping an arbitrary observable to void, using the IO scheduler.

Parameters:

fromObservable - the source observable

Returns:

a void-emitting observable

Applies to