Package: java.util.stream

## Interface DoubleStream

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `long` | `size()` An alias for `count`.

  - #### Methods inherited from interface java.util.stream.BaseStream

    `toList`, `toSet`

- - ### Methods Detail

    - #### public long size()

      An alias for `count`. Returns the count of elements for this stream. This is a terminal operator and, depending on the underlying stream, may invoke the stream pipeline, leaving it empty after this call. Care should be taken with stream pipelines that have side effects. This method should not be called on an infinite stream.

          double[] nums = [1.0d, 2.0d, 3.0d]
          assert nums.doubleStream().size() == 3

      Returns:
        the count of elements in this stream
      Since:
        5.0.0
      See Also:
        DoubleStream#count()