Package snap.util

Class EnumUtils

java.lang.Object
snap.util.EnumUtils

public class EnumUtils extends Object
Utility methods for Enums.
  • Constructor Details

    • EnumUtils

      public EnumUtils()
  • Method Details

    • valueOfIC

      public static <T extends Enum<T>> T valueOfIC(Class<T> enumType, String aName)
      Returns an enum for enum class and string, ignoring case.
    • getNamesFromCamelCaseEnumClass

      public static <T extends Enum<T>> String[] getNamesFromCamelCaseEnumClass(Class<T> enumClass)
      Returns an array of enum name strings adding spaces between camel case chars.
    • getNamesStringFromEnumArray

      public static String getNamesStringFromEnumArray(Enum[] anEnumArray)
      Returns a string with names separated by comma for array of enums.
    • getEnumArrayFromNamesString

      public static <T extends Enum<T>> T[] getEnumArrayFromNamesString(Class<T> enumType, String aName)
      Returns an enum array for a string of enum names separated by commas.