List of usage examples for java.util.stream DoubleStream collect
<R> R collect(Supplier<R> supplier, ObjDoubleConsumer<R> accumulator, BiConsumer<R, R> combiner);
From source file:Main.java
public static void main(String[] args) { DoubleStream b = DoubleStream.of(1.1, 2.2, 3.3, 4.4, 5.5); List<Double> names = b.collect(ArrayList::new, ArrayList::add, ArrayList::addAll); System.out.println(names);/*from w ww. j a v a2s . co m*/ }