我有一个自定义类的元素列表,如下所示:
private List<CoreVersionDetails> children;
CoreVersionDetails.java:
public class CoreVersionDetails {
private String uri;
private boolean folder;
public String getUri() {
return uri;
}
public void setUri(String input) {
this.uri = input;
}
public boolean getFolder() {
return folder;
}
public void setFolder(boolean input) {
this.folder = input;
}}
现在,我可以假设获得列表中的一个元素&#34; children&#34;类别uri使用:
children.get(0).geturi();
如何获取children.geturi的所有元素?