Class LocMap<K,​T>

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map<K,​T>

    public class LocMap<K,​T>
    extends java.lang.Object
    implements java.util.Map<K,​T>, java.io.Serializable
    Thread-safe localized value map to be used in AbstractItemModel.

    Please note this class was necessary to be created since ConcurrentHashMap is not capable to store NULL values.

    Internally all calls are delegated to a instance of ConcurrentHashMap but NULL values are masked by a specific token that is being translated upon read access.

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      LocMap()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      boolean containsKey​(java.lang.Object key)  
      boolean containsValue​(java.lang.Object value)  
      java.util.Set<java.util.Map.Entry<K,​T>> entrySet()  
      T get​(java.lang.Object key)  
      boolean isEmpty()  
      java.util.Set<K> keySet()  
      T put​(K locale, T value)  
      void putAll​(java.util.Map<? extends K,​? extends T> map)  
      T remove​(java.lang.Object key)  
      int size()  
      java.lang.String toString()  
      java.util.Collection<T> values()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • LocMap

        public LocMap()
    • Method Detail

      • put

        public T put​(K locale,
                     T value)
        Specified by:
        put in interface java.util.Map<K,​T>
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<K,​T>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<K,​T>
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<K,​T>
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<K,​T>
      • get

        public T get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<K,​T>
      • remove

        public T remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<K,​T>
      • putAll

        public void putAll​(java.util.Map<? extends K,​? extends T> map)
        Specified by:
        putAll in interface java.util.Map<K,​T>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<K,​T>
      • keySet

        public java.util.Set<K> keySet()
        Specified by:
        keySet in interface java.util.Map<K,​T>
      • values

        public java.util.Collection<T> values()
        Specified by:
        values in interface java.util.Map<K,​T>
      • entrySet

        public java.util.Set<java.util.Map.Entry<K,​T>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<K,​T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object