All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.api.model.common.LineEnding Maven / Gradle / Ivy

There is a newer version: 2.0.25
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy