Example usage for java.util.stream DoubleStream filter

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

Introduction

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

Prototype

DoubleStream filter(DoublePredicate predicate);

Source Link

Document

Returns a stream consisting of the elements of this stream that match the given predicate.

Usage

From source file:Main.java

public static void main(String[] args) {
    DoubleStream d = DoubleStream.of(1.2, 2.3, 4.5);
    d.filter(n -> n < 3).forEach(System.out::println);

}