Class EnumUtils


  • public class EnumUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      EnumUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends java.lang.Enum<T>>
      T
      findEnumInsensitiveCase​(java.lang.Class<T> enumType, java.lang.String name)
      Looks for an enumeration constant that matches the string without being case sensitive
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnumUtils

        public EnumUtils()
    • Method Detail

      • findEnumInsensitiveCase

        public static <T extends java.lang.Enum<T>> T findEnumInsensitiveCase​(java.lang.Class<T> enumType,
                                                                              java.lang.String name)
        Looks for an enumeration constant that matches the string without being case sensitive
        Type Parameters:
        T - - the enum type whose constant is to be returned
        Parameters:
        enumType - - the Class object of the enum type from which to return a constant
        name - - the name of the constant to return
        Returns:
        the enum constant of the specified enum type with the specified name, insensitive to case
        Throws:
        java.lang.IllegalArgumentException - – if the specified enum type has no constant with the specified name, insensitive case