Package org.apache.storm.utils

# Class EnumUtil

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

public class EnumUtil extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EnumUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.
  `static String`
  `toMetricName(Enum type)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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