Example usage for java.util.stream DoubleStream sorted

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

Introduction

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

Prototype

DoubleStream sorted();

Source Link

Document

Returns a stream consisting of the elements of this stream in sorted order.

Usage

From source file:Main.java

public static void main(String[] args) {
    DoubleStream d = DoubleStream.of(1.2, 4.5, 1.2, 2.3);

    DoubleStream r = d.sorted();

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