Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @FunctionalInterface
- public interface A {
- List<ItemB> a1(ItemA itemA);
- }
- @FunctionalInterface
- public interface B {
- List<ItemA> b1(ItemB itemB);
- }
- class MyClass{
- public <T,R> boolean execute(ItemA itemA, Function<T,R> function){
- function = ItemA.a1();
- //**how can I pick either ItemA or ItemB interface method and define it here?**
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement