org.bidib.wizard.api.model.common.LineEnding Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-api Show documentation
Show all versions of bidibwizard-api Show documentation
jBiDiB BiDiB Wizard API POM
package org.bidib.wizard.api.model.common;
public enum LineEnding {
CRLF("crlf"), CR("cr"), LF("lf");
private final String key;
private LineEnding(String key) {
this.key = key;
}
public String getKey() {
return key;
}
public static LineEnding fromKey(String key) {
for (LineEnding value : values()) {
if (value.key.equalsIgnoreCase(key)) {
return value;
}
}
throw new IllegalArgumentException("No matching LineEnding value found for key: " + key);
}
}