private void addFiles(Dataset dataset) { for (DatasetFileBean fileBean : files) { DataKey key = fileBean.extractDataKey(); DataFile file = fileBean.extractDataFile(); dataset.addFile(key, file); } }
private static void addFiles(Dataset dataset, DatasetBean bean) { List<DatasetFileBean> fileBeans = new ArrayList<DatasetFileBean>(); List<DataKey> sorted = new ArrayList<DataKey>(dataset.getAllFileKeys()); Collections.sort(sorted); for (DataKey key : sorted) { DataFile file = dataset.getFile(key); DatasetFileBean fileBean = DatasetFileBean.instance(key, file); fileBeans.add(fileBean); } bean.files = fileBeans.toArray(new DatasetFileBean[fileBeans.size()]); }