Advertisement
Guest User

Untitled

a guest
Feb 5th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. import java.util.ArrayList;
  2.  
  3. class A {
  4.  
  5. interface Function<B, C> {
  6. C apply(B input);
  7. }
  8.  
  9. private <B,C> Iterable<C> transform(Iterable<B> iterable, Function<? super B, ? extends C> transform) {
  10. // impl not relevant for bug
  11. return new ArrayList<>();
  12. }
  13.  
  14. public static class In<V> {}
  15. public static class Out<V> {}
  16.  
  17. public <V> Out<V> fn(In<V> in) {
  18. return null;
  19. }
  20.  
  21. public void myMethod() {
  22. Iterable<In<?>> ins = new ArrayList<>();
  23.  
  24. Iterable<Out<?>> outs = transform(ins, this::fn);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement