Class EventProducingCollection<T>

    • 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

      • EventProducingCollection

        public EventProducingCollection​(Collection<T> parent,
                                        Serializable sourceId)
        constructs a new EventProducingCollectiont.
        Parameters:
        parent - Collection<T>; the parent collection.
        sourceId - Serializable; the id by which the EventProducer can be identified by the EventListener
      • EventProducingCollection

        public EventProducingCollection​(Collection<T> parent,
                                        IdProvider sourceIdProvider)
        Constructs a new EventProducingCollection.
        Parameters:
        parent - Collection<T>; the parent set.
        sourceIdProvider - IdProvider; the function that produces the id by which the EventProducer can be identified by the EventListener