public List<SampleInfo> getSamplesForDataTypeAndTimepoint( ISPYDataType dataType, TimepointType timepoint) { List<SampleInfo> retList = new ArrayList<SampleInfo>(); for (SampleInfo sample : associatedSamples) { if ((sample.getDataTypes().contains(dataType)) && (sample.getTimepoint() == timepoint)) { retList.add(sample); } } return retList; }
public Set<SampleInfo> getSamplesForDataTypeAndTimepoints( ISPYDataType dataType, Set<TimepointType> timepoints) { Set<SampleInfo> retSet = new HashSet<SampleInfo>(); for (SampleInfo sample : associatedSamples) { if ((sample.getDataTypes().contains(dataType)) && (timepoints.contains(sample.getTimepoint()))) { retSet.add(sample); } } return retSet; }