title: Generic substitution principle - how application of principle is governed
body: <p>from the text "Java Generics and Collections" by Naftalin and Wadler, a passage states that though Integer is a subtype of Number, List&lt;Integer&gt; is not a subtype of List&lt;Number&gt;.</p>
  
  <p>This prevents one from using, polymorphically, references to the in places where one might traditionally expect to allow such statements.</p>
  
  <p>My question here is, since the 'substitution principle' does not apply in the case List&lt;Integer&gt; and List&lt;Number&gt;, does the restriction on the principle relate to where a class and a specific type (assigned for a generic type) are <strong>combined</strong> - in all cases and in general - (here as 'List&lt;Integer&gt;' for example). Here in this case I refer to the notion of substiution in resepct to a statement like 'List&lt;Integer&gt;', as opposed to 'List', or '&lt;Integer&gt;' seperatley.</p>
  
  <p>Or alternatively, is the restriciton instead defined through some mechanism that specifies whether and which classes are subtypes (and thus when and when it applies) as one does through the usual extends and implements mechanism. </p>
  
  <p>Essentially i do not understand the <strong>mechanism</strong> through which the susbtitution principle in such cases are <strong>caused to be</strong> defined as applying or not applying.</p>
  
  <p>many thanks</p>