Class NeverEmptyMap<K,​V>

  • Type Parameters:
    K -
    V -
    All Implemented Interfaces:
    Map<K,​V>

    public class NeverEmptyMap<K,​V>
    extends Object
    implements Map<K,​V>
    map with item stay a specified time inside.
    Author:
    Patrick Vandermaesen
    • Constructor Detail

      • NeverEmptyMap

        public NeverEmptyMap​(Class defaultInstance)
        set the default time of the attribute live in second
      • NeverEmptyMap

        public NeverEmptyMap​(Class clazzKey,
                             Class defaultInstance)
        set the default time of the attribute live in second
      • NeverEmptyMap

        public NeverEmptyMap​(Map<K,​V> internalMap)
      • NeverEmptyMap

        public NeverEmptyMap​(Map<K,​V> internalMap,
                             int inDefaultTimeLiveValueSecond)
    • Method Detail

      • clear

        public void clear()
        Specified by:
        clear in interface Map<K,​V>
      • containsKey

        public boolean containsKey​(Object arg0)
        Specified by:
        containsKey in interface Map<K,​V>
      • get

        public V get​(Object inKey)
        Specified by:
        get in interface Map<K,​V>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Map<K,​V>
      • keySet

        public Set<K> keySet()
        Specified by:
        keySet in interface Map<K,​V>
      • put

        public V put​(K inKey,
                     V value)
        Specified by:
        put in interface Map<K,​V>
      • putAll

        public void putAll​(Map<? extends K,​? extends V> m)
        Specified by:
        putAll in interface Map<K,​V>
      • remove

        public V remove​(Object key)
        Specified by:
        remove in interface Map<K,​V>
      • size

        public int size()
        Specified by:
        size in interface Map<K,​V>
      • main

        public static void main​(String[] args)