我有这样的类结构:
public class NFAddress
public class NFAddresses<T extends NFAddress> extends ArrayList<NFAddress>
public class NFMutableAddress extends NFAddress
public class NFMutableAddresses<T extends NFMutableAddress> extends NFAddresses<NFMutableAddress>
当我尝试访问 NFMutableAddresses 中的对象时
for (NFMutableAddress nucleusAddress : this) { 对象被定义为 NFAddress 而不是 NFMutableAddress }
谢谢你的帮助。