All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aol.cyclops.javaslang.ToStream Maven / Gradle / Ivy

There is a newer version: 8.4.2
Show newest version
package com.aol.cyclops.javaslang;

import com.aol.simple.react.stream.traits.LazyFutureStream;
import com.google.common.collect.FluentIterable;
import com.nurkiewicz.lazyseq.LazySeq;

import org.jooq.lambda.Seq;

import java.util.stream.Stream;

/**
 * Created by johnmcclean on 4/8/15.
 */
public class ToStream {

    public static  FluentIterable toFluentIterable(javaslang.collection.Stream s){
        return FluentIterable.from(s);
    }
    public static  Stream toStream(javaslang.collection.Stream s){
        return Seq.seq(s.iterator());
    }
    public static  Seq toJooqLambda(javaslang.collection.Stream s){
        return Seq.seq(s.iterator());
    }
    public static  LazyFutureStream toFutureStream(javaslang.collection.Stream s){
        return LazyFutureStream.lazyFutureStream(s.iterator());
    }

    public static  LazySeq toLazySeq(javaslang.collection.Stream s){
        return LazySeq.of(s.iterator());
    }

    public static  fj.data.Stream toFunctionalJavaStream(javaslang.collection.Stream s){
        return fj.data.Stream.iterableStream(s);
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy