Class TEnumHelper


  • public class TEnumHelper
    extends java.lang.Object
    Utility class with static methods for interacting with TEnum
    • Constructor Summary

      Constructors 
      Constructor Description
      TEnumHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method 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.