Class EnumUtil

java.lang.Object
org.apache.storm.utils.EnumUtil

public class EnumUtil extends Object
  • Constructor Details

    • EnumUtil

      public EnumUtil()
  • Method Details

    • 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