kz.greetgo.msoffice.xlsx.reader.model.BorderStyle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greetgo.msoffice Show documentation
Show all versions of greetgo.msoffice Show documentation
greetgo library to generate or parse MS Office files
package kz.greetgo.msoffice.xlsx.reader.model;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public enum BorderStyle {
hair, dotted, dashDotDot, dashDot, dashed, thin, mediumDashDotDot,
slantDashDot, mediumDashDot, mediumDashed, medium, thick, _double,
NONE;
private static final Map map;
static {
Map map1 = new HashMap<>();
for (BorderStyle value : values()) {
String name = value.name();
if (name.startsWith("_")) {
name = name.substring(1);
}
map1.put(name, value);
}
map = Collections.unmodifiableMap(map1);
}
public static Optional from(String str) {
if (str == null) return Optional.empty();
return Optional.ofNullable(map.get(str));
}
}