org.apache.thrift

## Class TEnumHelper

- java.lang.Object
- - org.apache.thrift.TEnumHelper

-     public class TEnumHelper
      extends java.lang.Object

  Utility class with static methods for interacting with TEnum

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TEnumHelper()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TEnum` | `getByValue(java.lang.Class<? extends TEnum> enumClass, int value)` Given a TEnum class and integer value, this method will return the associated constant from the given TEnum class.

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

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

- - ### Constructor Detail

    - #### TEnumHelper

          public TEnumHelper()

  - ### Method Detail

    - #### getByValue

          public static TEnum getByValue(java.lang.Class<? extends TEnum> enumClass,
                         int value)

      Given a TEnum class and integer value, this method will return the associated constant from the given TEnum class. This method MUST be modified should the name of the 'findByValue' method change.
      Parameters:
        `enumClass` - TEnum from which to return a matching constant.
        `value` - Value for which to return the constant.
      Returns:
        The constant in 'enumClass' whose value is 'value' or null if something went wrong.