Class CanonicalConstantMap<T>


  • public class CanonicalConstantMap<T>
    extends java.lang.Object
    A thread safe store of immutable objects. Only keeps one instance of equal objects.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ConcurrentHashMap<T,​T> map  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T canonicalize​(T object)  
      • Methods inherited from class java.lang.Object

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

      • map

        private final java.util.concurrent.ConcurrentHashMap<T,​T> map
    • Constructor Detail

      • CanonicalConstantMap

        public CanonicalConstantMap()
    • Method Detail

      • canonicalize

        public T canonicalize​(T object)