de.esprit.common.util

## Class EnumUtil

- java.lang.Object
- - de.esprit.common.util.EnumUtil

-     public class EnumUtil
      extends java.lang.Object

  This class contains utilities concerning enums
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EnumUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <P extends PersistentId> P` | `fromPersistentId(int id, P[] values)` Returns the enum that matches the given persistent ID
    `static <P extends PersistentName> P` | `fromPersistentName(java.lang.String code, P[] values)` Returns the enum that matches the given persistent CODE.
    `static <P extends PersistentName> P` | `fromPersistentName(java.lang.String code, P[] values, boolean isCaseSensitive)` Returns the enum that matches the given persistent CODE

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

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

- - ### Constructor Detail

    - #### EnumUtil

          public EnumUtil()

  - ### Method Detail

    - #### fromPersistentId

          public static <P extends PersistentId> P fromPersistentId(int id,
                                                    P[] values)

      Returns the enum that matches the given persistent ID

    - #### fromPersistentName

          public static <P extends PersistentName> P fromPersistentName(java.lang.String code,
                                                        P[] values)

      Returns the enum that matches the given persistent CODE. Is case sensitive by default

    - #### fromPersistentName

          public static <P extends PersistentName> P fromPersistentName(java.lang.String code,
                                                        P[] values,
                                                        boolean isCaseSensitive)

      Returns the enum that matches the given persistent CODE

Copyright © 2014 EsprIT-Systems. All Rights Reserved.