Search in sources :

Example 1 with PersistentSetX

use of cyclops.reactive.collections.immutable.PersistentSetX in project cyclops by aol.

the class MiscTest method pVectorX.

@Test
public void pVectorX() {
    ReactiveSeq<String> seq = Spouts.from(VectorX.of(1, 2, 3, 4).plus(5).map(i -> "connect toNested Akka, RxJava and more with reactiveBuffer-streams" + i));
    PersistentSetX<String> setX = seq.to(s -> new LazyReact().fromStream(s)).map(data -> "fan out across threads with futureStreams" + data).to(ReactiveConvertableSequence::converter).persistentSetX();
}
Also used : ListX(cyclops.reactive.collections.mutable.ListX) Arrays(java.util.Arrays) ReactiveConvertableSequence(com.oath.cyclops.ReactiveConvertableSequence) Spouts(cyclops.reactive.Spouts) LazyReact(cyclops.futurestream.LazyReact) VectorX(cyclops.reactive.collections.immutable.VectorX) Futures(cyclops.companion.Futures) Test(org.junit.Test) Future(cyclops.control.Future) Supplier(java.util.function.Supplier) Assert.assertThat(org.junit.Assert.assertThat) ReactiveSeq(cyclops.reactive.ReactiveSeq) Flux(reactor.core.publisher.Flux) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Matchers.equalTo(org.hamcrest.Matchers.equalTo) SimpleReact(cyclops.futurestream.SimpleReact) Optional(java.util.Optional) Matchers.greaterThan(org.hamcrest.Matchers.greaterThan) Matchers.is(org.hamcrest.Matchers.is) PersistentSetX(cyclops.reactive.collections.immutable.PersistentSetX) LazyReact(cyclops.futurestream.LazyReact) Test(org.junit.Test)

Aggregations

ReactiveConvertableSequence (com.oath.cyclops.ReactiveConvertableSequence)1 Futures (cyclops.companion.Futures)1 Future (cyclops.control.Future)1 LazyReact (cyclops.futurestream.LazyReact)1 SimpleReact (cyclops.futurestream.SimpleReact)1 ReactiveSeq (cyclops.reactive.ReactiveSeq)1 Spouts (cyclops.reactive.Spouts)1 PersistentSetX (cyclops.reactive.collections.immutable.PersistentSetX)1 VectorX (cyclops.reactive.collections.immutable.VectorX)1 ListX (cyclops.reactive.collections.mutable.ListX)1 Arrays (java.util.Arrays)1 Optional (java.util.Optional)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Supplier (java.util.function.Supplier)1 Matchers.equalTo (org.hamcrest.Matchers.equalTo)1 Matchers.greaterThan (org.hamcrest.Matchers.greaterThan)1 Matchers.is (org.hamcrest.Matchers.is)1 Assert.assertThat (org.junit.Assert.assertThat)1 Test (org.junit.Test)1 Flux (reactor.core.publisher.Flux)1