For empty stream this method will always return true.
package com.logicbig.example.intstream;
import java.util.stream.IntStream;
public class AllMatchExample2 {
public static void main(String... args) {
IntStream intStream = IntStream.empty();
boolean b = intStream.allMatch(i -> false);
System.out.println(b);
}
}
Output
true