public final class Subjects
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> Subject<T,T> |
newSubject()
Creates a new subject which simply forwards its observed values
to the registered observers.
|
static <T,U> Subject<T,U> |
newSubject(Func1<? super T,? extends U> selector)
Creates a new subject which forwards its observed values after
applying the selector function.
|
static <T,U> Subject<T,U> |
newSubject(Observer<? super T> observer,
Observable<? extends U> observable)
Wraps the observer and observable instances into a Subject.
|
@Nonnull public static <T,U> Subject<T,U> newSubject(@Nonnull Observer<? super T> observer, @Nonnull Observable<? extends U> observable)
T - the type the observer usesU - the type the observable usesobserver - the observer objectobservable - the observable object@Nonnull public static <T> Subject<T,T> newSubject()
T - the element type@Nonnull public static <T,U> Subject<T,U> newSubject(@Nonnull Func1<? super T,? extends U> selector)
T - the observed element typeU - the forwarded element typeselector - the selector to use