java 中的Collection<? extends Object>c是什么意思

<?extends Object>表示Collection集合中可以存放任意的Object子类
详细情况请看sun 网站

示列代码:

public BusinessAuthenticationToken(Object principal, String phone, Integer merchantId,
boolean cxqyStaff, boolean normalMerchantAuth,
Collection<? extends GrantedAuthority> authorities) {
super(authorities);
if (authorities == null || authorities.size() == 0) {
setAuthenticated(false);
} else {
super.setAuthenticated(true);
}
this.principal = principal;
this.phone = phone;
this.cxqyStaff = cxqyStaff;
this.merchantId = merchantId;
this.normalMerchantAuth = normalMerchantAuth;
}
原文地址:https://www.cnblogs.com/yangsanluo/p/14576454.html