net.sf.bioutils.proteomics.sample.SelectorSampleByBaseName Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proteomics Show documentation
Show all versions of proteomics Show documentation
Lightweight framework for handling biological and bioinformatical data related to proteomics.
package net.sf.bioutils.proteomics.sample;
import java.util.Collection;
import net.sf.kerner.utils.collections.Selector;
public class SelectorSampleByBaseName implements Selector {
private final String name;
public SelectorSampleByBaseName(final String name) {
this.name = name;
}
@Override
public T select(final Collection extends T> elements) {
for (final T s : elements) {
if (s.getNameBase().equals(name)) {
return s;
}
}
return null;
}
}