...
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 BatchNumberUniqueness parseString(final String string) { if ("01globally"GLOBALLY.getStringValue().equals(string)) { return GLOBALLY; } else if ("02manufacturer"(MANUFACTURER.getStringValue().equals(string)) { return MANUFACTURER; } else { throw new IllegalArgumentException("Couldn't parse BatchNumberUniqueness from string '" + string + "'"); } } @Override public String toString() { return stringValue; } } |
...