package com.logicbig.example.doublestream;
import java.util.stream.DoubleStream;
public class AllMatchExample {
public static void main(String... args) {
DoubleStream doubleStream = DoubleStream.of(1.2, 1.3, 1.4, 1.5, 1.6);
boolean b = doubleStream.allMatch(value -> value < 2.0d);
System.out.println(b);
DoubleStream doubleStream2 = DoubleStream.of(1.2, 1.3, 1.4, 1.5, 2.0001);
boolean b2 = doubleStream2.allMatch(value -> value <= 2.0d);
System.out.println(b2);
}
}