Example usage for java.util.stream DoubleStream count

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

Introduction

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

Prototype

long count();

Source Link

Document

Returns the count of elements in this stream.

Usage

From source file:Main.java

public static void main(String[] args) {
    DoubleStream i = DoubleStream.empty();
    System.out.println(i.count());
}

From source file:Main.java

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

    long r = d.count();

    System.out.println(r);/*  www.ja v a  2 s  . co  m*/
}