Wildcards and Subtyping - Oracle Documentation
This document shows the relationship between several classes of a class declared with both upper and lower bounded wildcards. The connection depicted in the figure below:
In the right hierarchy, List<? super Number>is a type subtype List<? super Integer>. Doesn't that bother you?
List<? super Number>
List<? super Integer>
As I understand it, it List<? super Number>can be represented by anyone List<type>, typeanywhere Number, or a superclass Number. The same logic holds for List<? super Integer>. So how to List<? super Number>be a subtype List<? super Integer>?
List<type>
type
Number
, List<? super Number> Number , List<? super Integer> + .
: , . List<? super Number> List<? super Integer>, .
, , :
Source: https://habr.com/ru/post/1659545/More articles:Getting the same value for a timestamp on subsequent calls - c ++Compilation error when upgrading from 19 to 20 - javaMultiple NSFetchedResultsControllers in Swift 3 - genericsПеренаправить мобильного пользователя в другой .html файл только один раз. - javascriptWhat is the difference between a two-way adapter and an adaptive adapter adapter in C #? - c #SafetyNet api, get nonce from server, not client - androidВыбор jQuery после id - javascriptHow to get hue color from ImageView using code - androidThe main view of the application does not change to fill the screen when the device is rotated - iosHeadache of inheritance of Kotinovsky generics - androidAll Articles