Looking at the head of a List does not work.
The class of that element is within the scope of <? extends ListType>, an is not necessarily not ListType.
- a List<Thing>
- a List<ThingSuperclass>
- a List<? extends Thing>
- a List<? super ThingSubclass>
- a List<IThing>
- a List<ILiterallyAnyImplementedIFace>
- a List<IHaventForgottenInterfacesCanExtendOthers>
- a List<Object>
- a List<I'm probably forgetting some possibilities>
And you have no way of knowing which it is.So yes, it's a boundary, which is significantly more than nothing. But far less useful than it feels like at first.
Idiot.