Java8 Functional Interfaces - huide9/wiki GitHub Wiki

Common Functional Interfaces

Interface Parameter Types Return Type Abstract Method DESC. Other Methods
Runnable none void run Runs an action without arguments or return values
Supplier none T get Supplies a value of type T
Consumer T void accept Consumes a value of type T chain
BiConsumer<T,U> T,U void accept Consumes values of type T and U chain
Function<T, R> T R apply A function with argument of type T compose,
andThen,
identity
BiFunction<T,U,R> T,U R apply A function with args of type T & U andThen
UnaryOperator T T apply A unary operator on the type T compose,
andThen,
identity
BinaryOperator T,T T apply A binary operator on the type T andThen
Predicate T boolean test A Boolean-valued function and,or,
negate,
isEqual
BiPredicate<T,U> T,U boolean test A Boolean-valuded function with two args and,or,
negate
⚠️ **GitHub.com Fallback** ⚠️