Class EnumValue

java.lang.Object
com.illumon.util.type.EnumValue

public class EnumValue extends Object
  • Constructor Details

    • EnumValue

      public EnumValue()
  • Method Details

    • caseInsensitiveValueOf

      public static <T extends Enum<?>> T caseInsensitiveValueOf(Class<T> enumClass, String value)
      Retrieves the enum constant whose name matches a given value according to case-insensitive comparison.
      Parameters:
      enumClass - the enum type we are querying
      value - the constant value we are looking up
      Returns:
      the enum constant
      Throws:
      IllegalArgumentException - when value is not found in the Enum's constants