Sunday, April 22, 2012

Java Covariant, Contravariant

    List<T>                                    T  
      Λ                                        Λ 
      |                       if               |
      |                                        |
List<? extends T>                              ?


    List<T>                                    ?  
      Λ                                        Λ 
      |                       if               |
      |                                        |
List<?  super  T>                              T

No comments:

Post a Comment