Class EnumCache


  • public class EnumCache
    extends java.lang.Object
    Provides a memoized way to lookup an enum by its value. This class is used internally by TDeserializer. It is not intended to be used separately on its own.
    • Constructor Summary

      Constructors 
      Constructor Description
      EnumCache()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TEnum get​(java.lang.Class<? extends TEnum> enumClass, int value)
      Gets an instance of the enum type enumClass corresponding to the given value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnumCache

        public EnumCache()
    • Method Detail

      • get

        public TEnum get​(java.lang.Class<? extends TEnum> enumClass,
                         int value)
        Gets an instance of the enum type enumClass corresponding to the given value.
        Parameters:
        enumClass - class of the enum to be returned.
        value - value returned by getValue().