com.aol.cyclops.streams.operators.MultiCollectOperator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cyclops-streams Show documentation
Show all versions of cyclops-streams Show documentation
Sequential Streams and Stream Utilities for Java 8
package com.aol.cyclops.streams.operators;
import java.util.Iterator;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.BinaryOperator;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import lombok.Value;
import org.jooq.lambda.Seq;
import org.jooq.lambda.tuple.Tuple2;
import com.aol.cyclops.sequence.streamable.Streamable;
@Value
public class MultiCollectOperator {
Stream stream;
public List collect(Streamable collectors){
final Supplier supplier = ()-> collectors.stream().map(c->c.supplier().get()).collect(Collectors.toList());
final BiConsumer accumulator = (acc,next) -> { Seq.seq(collectors.stream().iterator()).
© 2015 - 2024 Weber Informatics LLC | Privacy Policy