Example usage for java.util.stream DoubleStream boxed

List of usage examples for java.util.stream DoubleStream boxed

Introduction

In this page you can find the example usage for java.util.stream DoubleStream boxed.

Prototype

Stream<Double> boxed();

Source Link

Document

Returns a Stream consisting of the elements of this stream, boxed to Double .

Usage

From source file:Main.java

public static void main(String[] args) {
    DoubleStream i = DoubleStream.generate(new Random()::nextDouble);
    Stream<Double> o = i.boxed();

    o.limit(10).forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    DoubleStream i = DoubleStream.of(1.0, 2.0, 3.3, 4.4, 5.5, 6.6, 7.7);
    Stream<Double> o = i.boxed();

    o.forEach(System.out::println);
}

From source file:Main.java

public static void main(String[] args) {
    DoubleStream i = DoubleStream.concat(DoubleStream.of(1.0, 2.0, 3.3), DoubleStream.of(4.4, 5.5, 6.6, 7.7));
    Stream<Double> o = i.boxed();

    o.forEach(System.out::println);
}