Class EnumUtil


  • public class EnumUtil
    extends Object
    • Constructor Detail

      • EnumUtil

        public EnumUtil()
    • Method Detail

      • toMetricName

        public static String toMetricName​(Enum type)
      • toEnumMap

        public static <T extends Enum<T>,​U> EnumMap<T,​U> toEnumMap​(Class<T> klass,
                                                                               Function<? super T,​? extends U> mapper)
        Create an Enum map with given lambda mapper.
        Parameters:
        klass - the Enum class
        mapper - The mapper producing value with key (enum constant)
        Returns:
        An Enum map