Skip to content

Instantly share code, notes, and snippets.

@ru-rocker
Created December 18, 2016 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ru-rocker/791761358ad024215df63eb53077c5f0 to your computer and use it in GitHub Desktop.
Save ru-rocker/791761358ad024215df63eb53077c5f0 to your computer and use it in GitHub Desktop.
Supplier<Stream<Integer>> supplier = () -> Stream.of(1, 2, 3, 4);
boolean anyMatch = supplier.get().anyMatch(s -> s > 0);
System.out.println(anyMatch);// true
boolean noneMatch = supplier.get().noneMatch(s -> s > 0);
System.out.println(noneMatch);// false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment