@Override public <T> List<T> getValues(String name, Class<T> type) { List<T> result = new ArrayList<T>(); for (DatasetRow rec : rows) { result.addAll(rec.getValues(name, type)); } return result; }
@Override public List<Object> getValues(String name) { List<Object> result = new ArrayList<Object>(); for (DatasetRow rec : rows) { result.addAll(rec.getValues(name)); } return result; }
/** * Constructor. * * @param wrappedRecords records to wrap */ protected Dataset(List<DatasetRow> wrappedRecords) { this.rows = wrappedRecords; int tempSize = 0; for (DatasetRow wr : wrappedRecords) { tempSize += wr.size(); } size = tempSize; }
@Override public Set<ParameterSelection> getAllParameterConfigurations() { Set<ParameterSelection> result = new HashSet<ParameterSelection>(); for (DatasetRow wr : rows) { result.addAll(wr.getAllParameterConfigurations()); } return result; }
@Override public <T extends AbstractRecord> java.util.List<T> getRecords(Class<T> recordType) { List<T> result = new ArrayList<T>(); for (DatasetRow rec : rows) { result.addAll(rec.getRecords(recordType)); } return result; }
@Override public List<AbstractRecord> getRecords() { List<AbstractRecord> result = new ArrayList<AbstractRecord>(); for (DatasetRow rec : rows) { result.addAll(rec.getRecords()); } return result; }
@Override public String[] getTypes() { if (rows.isEmpty()) { return null; } for (DatasetRow wr : rows) { String[] types = wr.getTypes(); if (types != null) { return types; } } return null; }
@Override public String[] getHeader() { if (rows.isEmpty()) { return null; } for (DatasetRow wr : rows) { String[] header = wr.getHeader(); if (header != null) { return header; } } return null; }