Package org.apache.thrift
Class TEnumHelper
java.lang.Object
org.apache.thrift.TEnumHelper
Utility class with static methods for interacting with TEnum
-
Method Summary
Modifier and TypeMethodDescriptionstatic TEnumgetByValue(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.
-
Method Details
-
getByValue
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.
-