List of usage examples for java.util.stream DoubleStream mapToObj
<U> Stream<U> mapToObj(DoubleFunction<? extends U> mapper);
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); b.mapToObj(n -> { return n * n + ""; }).forEach(System.out::println); }
From source file:ch.zweivelo.renderer.simple.math.LinearSolverTest.java
@Test public void testSolveLinear() throws Exception { DoubleStream solutions = LINEAR.solve(2d, 1d); assertNotNull(solutions);// www . j a va 2 s . c o m List<Double> solutionsList = solutions.mapToObj(d -> d).collect(toList()); assertEquals(1l, solutionsList.size()); assertEquals(solutionsList.get(0), -2d, EPSILON); }