Class TEnumHelper

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

public class TEnumHelper extends Object
Utility class with static methods for interacting with TEnum
  • Method Details

    • getByValue

      public static TEnum getByValue(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.