blob: 89a45979ab2c93c8eb09e6b45dcef7b4d39372d1 [file] [log] [blame]
package aQute.bnd.build.model;
public enum UpperVersionMatchType {
Exact("${@}"), NextMicro("${version;==+;${@}}"), NextMinor("${version;=+;${@}}"), NextMajor("${version;+;${@}}");
private final String representation;
private UpperVersionMatchType(String representation) {
this.representation = representation;
}
public String getRepresentation() {
return representation;
}
public static UpperVersionMatchType parse(String string) throws IllegalArgumentException {
for (UpperVersionMatchType type : UpperVersionMatchType.class.getEnumConstants()) {
if (type.getRepresentation().equals(string)) {
return type;
}
}
throw new IllegalArgumentException("Failed to parse version match type.");
}
}