Пример #1
0
  static {
    lookup = new HashMap<>();

    for (XlDisplayBlanksAs e : EnumSet.allOf(XlDisplayBlanksAs.class)) {
      lookup.put(e.value(), e);
    }
  }
Пример #2
0
  /**
   * Find the enum type by its value, with the default value.
   *
   * @param value The enum value.
   * @param defaultValue The default return value if the enum value does not exists.
   * @return The enum type, or the default value if this enum value does not exists.
   * @since 1.0
   */
  public static XlDisplayBlanksAs find(int value, XlDisplayBlanksAs defaultValue) {
    XlDisplayBlanksAs result = XlDisplayBlanksAs.find(value);

    if (result == null) {
      result = defaultValue;
    }

    return result;
  }