Greg Valvo
Greg Valvo

Reputation: 1099

Java interface like Predicate, but without an argument

I'm looking for a preexisting functional interface like Predicate, but one whose test method takes no arguments.

Upvotes: 55

Views: 8383

Answers (1)

Paul Boddington
Paul Boddington

Reputation: 37665

You're looking for BooleanSupplier.

https://docs.oracle.com/javase/8/docs/api/java/util/function/BooleanSupplier.html

Upvotes: 55

Related Questions