git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@619
180e2498-e6e9-4542-8430-
84ac67f01cd8
throw new IllegalArgumentException("name=" + name);
}
throw new IllegalArgumentException("name=" + name);
}
+ public Unit getUnit( String name ) throws IllegalArgumentException {
+ for (int i = 0; i < units.size(); i++) {
+ if (units.get(i).getUnit().equals(name)) {
+ return units.get(i);
+ }
+ }
+ throw new IllegalArgumentException("name=" + name);
+ }
public Unit getUnit(int n) {
return units.get(n);
public Unit getUnit(int n) {
return units.get(n);