Well you know predicate, function and consumer can only accept one input argument but sometimes we need a two-argument type functional interface in that situation we can use these predefined functional interfaces.
- BiPredicate
- BiFunction
- BiConsumer
BiPredicate: It is the same as a predicate interface but the only difference is it takes two input arguments to perform a conditional check.
1 2 | interface BiPredicate<T,U> { |
BiFunction: It is the same as a function predefine functional interface but the only difference is it takes two input arguments to perform some operation.
1 2 | interface BiFunction<T,U,R> { |
BiConsumer: BiConsumer is exactly the same as Consumer except that it will take 2 input arguments
1 2 | interface BiConsumer<T,U> { |
1 comments:
Write commentsplease add videos of spring cloud
ReplyEmoticonEmoticon