An empty stream will return true
package com.logicbig.example.stream;
import java.util.ArrayList;
public class AllMatchExample2 {
public static void main(String... args) {
boolean b = new ArrayList<>().stream()
.allMatch(e -> false);
System.out.println(b);
}
}
Output
true