public class Publishers
extends java.lang.Object
| Constructor and Description |
|---|
Publishers() |
| Modifier and Type | Method and Description |
|---|---|
static <T> AnyMSeq<T> |
anyM(org.reactivestreams.Publisher<T> flux)
Construct an AnyM type from a Publisher.
|
static <T> java.util.stream.Stream<T> |
jdkStream(org.reactivestreams.Publisher<T> pub)
Convert a reactive-streams Publisher to a plain java.util.Stream
|
static <T> ReactiveSeq<T> |
stream(org.reactivestreams.Publisher<T> pub)
Convert a reactive-streams Publisher to a cyclops-react ReactiveSeq extended Stream type
|
public static <T> AnyMSeq<T> anyM(org.reactivestreams.Publisher<T> flux)
AnyMSeq<Integer> publisher = Publishers.anyM(Flux.just(1,2,3));
AnyMSeq<Integer> transformedPublisher = myGenericOperation(flux);
public AnyMSeq<Integer> myGenericOperation(AnyMSeq<Integer> monad);
flux - To wrap inside an AnyMpublic static <T> ReactiveSeq<T> stream(org.reactivestreams.Publisher<T> pub)
pub - Publisher to convert to a Streampublic static <T> java.util.stream.Stream<T> jdkStream(org.reactivestreams.Publisher<T> pub)
pub - Publisher to convert to a Stream