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

kz.greetgo.msoffice.xlsx.reader.model.BorderStyle Maven / Gradle / Ivy

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy