...
Code Block | ||
---|---|---|
| ||
public enum BatchNumberUniqueness {
GLOBALLY("01globally"), MANUFACTURER("02manufacturer");
private final String stringValue;
private BatchNumberUniqueness(final String stringValue) {
this.stringValue = stringValue;
}
public String getStringValue() {
return stringValue;
}
public static final BatchNumberUniqueness parseString(final String string) {
if ("01globally".equals(string)) {
return GLOBALLY;
} else if ("02manufacturer".equals(string)) {
return MANUFACTURER;
} else {
throw new IllegalArgumentException("Couldn't parse BatchNumberUniqueness from string '" + string + "'");
}
}
@Override
public String toString() {
return stringValue;
}
} |
...