Class EventProducingMap<K,​V>

    • Field Detail

      • OBJECT_ADDED_EVENT

        public static final EventType OBJECT_ADDED_EVENT
        OBJECT_ADDED_EVENT is fired on new entries.
      • OBJECT_REMOVED_EVENT

        public static final EventType OBJECT_REMOVED_EVENT
        OBJECT_REMOVED_EVENT is fired on removal of entries.
      • OBJECT_CHANGED_EVENT

        public static final EventType OBJECT_CHANGED_EVENT
        OBJECT_CHANGED_EVENT is fired on change of one or more entries.
    • Constructor Detail

      • EventProducingMap

        public EventProducingMap​(Map<K,​V> parent,
                                 Serializable sourceId)
        constructs a new EventProducingMap.
        Parameters:
        parent - Map<K,V>; the embedded map.
        sourceId - Serializable; the id by which the EventProducer can be identified by the EventListener
      • EventProducingMap

        public EventProducingMap​(Map<K,​V> parent,
                                 IdProvider sourceIdProvider)
        Constructs a new EventProducingMap.
        Parameters:
        parent - Map<K, V>; the parent map.
        sourceIdProvider - IdProvider; the function that produces the id by which the EventProducer can be identified by the EventListener
    • Method Detail

      • size

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

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

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

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

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

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

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

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

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