Class EventProducingSet<E>

java.lang.Object
org.djutils.event.LocalEventProducer
org.djutils.event.collection.EventProducingSet<E>
Type Parameters:
E - the type of elements in the set
All Implemented Interfaces:
Serializable, Iterable<E>, Remote, Collection<E>, EventListener, Set<E>, EventListener, EventProducer

public class EventProducingSet<E> extends LocalEventProducer implements EventListener, Set<E>
The Event producing set provides a set to which one can subscribe interest in entry changes. This class does not keep track of changes which take place indirectly. One is for example not notified on map.iterator.remove(). A listener must subscribe to the iterator individually.

Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html. This class was originally part of the DSOL project, see https://simulation.tudelft.nl/dsol/manual.

Author:
Peter Jacobs , Alexander Verbraeck
See Also:
  • Field Details

    • 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 Details

    • EventProducingSet

      public EventProducingSet(Set<E> wrappedSet)
      Constructs a new EventProducingSet.
      Parameters:
      wrappedSet - Set<E>; the embedded set.
  • Method Details