Example usage for java.util.stream IntStream allMatch

List of usage examples for java.util.stream IntStream allMatch

Introduction

In this page you can find the example usage for java.util.stream IntStream allMatch.

Prototype

boolean allMatch(IntPredicate predicate);

Source Link

Document

Returns whether all elements of this stream match the provided predicate.

Usage

From source file:Main.java

public static void main(String[] args) {
    IntStream i = IntStream.concat(IntStream.of(6, 5, 7, 1, 2, 3, 3), IntStream.of(9, 8));
    boolean d = i.allMatch(n -> n > 0);
    System.out.println(d);/*www  . jav  a2s.c  o  m*/
}