bounded wildcard type 有限制的通配符类型
unbounded wildcard type 无限制的通配符类型
restricteded wildcard type 无限制的通配符类型
WildcardType just defines a pair of methods to return both lower and upper bounds for the wildcard type.
WildcardType只定义了两个方法,返回通配类型的下界和上界。
Unfortunately, you can't invoke a generic constructor with a wildcard type argument, even though you know such a constructor exists. However, you can do this.
不幸的是,您不能用通配符类型的参数调用泛型构造函数,即使知道存在这样的构造函数也不行。
In the case of generic methods, if a type parameter appears only once in the method signature, then it probably should be a wildcard rather than a named type parameter.
就泛型方法来说,如果一个类型参数在方法签名中只出现一次,它很有可能是一个通配符而不是一个命名的类型参数。
应用推荐