Java Generics: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* https://docs.oracle.com/javase/tutorial/java/generics/
* https://docs.oracle.com/javase/tutorial/extra/generics/index.html
=Internal=
=Internal=
* [[Java#Java_5|Java]]
* [[Java#Java_5|Java]]


=TODO=
=Subjects=
 
* [[Java Generics Concepts|Concepts]]
O'Reilly Java Generics and Collections.
* [[Java Generics Programming Model|Programming Model]]
 
 
=Organizatorium=
 
* '''Covariance''' Let T and S be two types (class or function types), such that S is a subtype of T. If method m of T is overridden in S, then the corresponding types from the m's signature can either preserve the relationship between T and S (the type used in S is a subtype of the corresponding type in T), reverse the relationship (the type used in S is a super type of the type used in T), or neither preserve nor reverse this relationship. If they preserve the relationship to T and S, we say they are covariant, if they reverse the relationship of T and S, we say they are contravariant.

Latest revision as of 00:36, 10 September 2021