return "Unknown ion type";
default:
throw new UnsupportedOperationException("No name for ion type " + type + ".");
}
}
<BUG>public static Ion getGenericIon(IonType ionType, int subType, ArrayList<NeutralLoss> neutralLosses) {
</BUG>
switch (ionType) {
case ELEMENTARY_ION:
return new ElementaryIon("new ElementaryIon", 0.0, subType);

return "Unknown ion type";
default:
throw new UnsupportedOperationException("No name for ion type " + type + ".");
}
}
public static Ion getGenericIon(IonType ionType, int subType, NeutralLoss[] neutralLosses) {
switch (ionType) {
case ELEMENTARY_ION:
return new ElementaryIon("new ElementaryIon", 0.0, subType);
