Class EventAccumulator<T>

java.lang.Object
VASSAL.tools.concurrent.listener.EventAccumulator<T>
All Implemented Interfaces:
EventListener<T>

@Deprecated(since="2021-12-01", forRemoval=true) public class EventAccumulator<T> extends Object implements EventListener<T>
Deprecated, for removal: This API element is subject to removal in a future version.
An EventListener which accumulates the events it receives into a List.
Since:
3.2.0
Author:
Joel Uckelman
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Collection<Pair<Object,T>>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the collection of received source-event pairs.
    void
    receive(Object src, T event)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Receive notification of an event.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • col

      protected final Collection<Pair<Object,T>> col
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • EventAccumulator

      public EventAccumulator()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • EventAccumulator

      public EventAccumulator(Collection<Pair<Object,T>> col)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • receive

      public void receive(Object src, T event)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Receive notification of an event.
      Specified by:
      receive in interface EventListener<T>
      Parameters:
      src - the source of the event
      event - the event
    • events

      public Collection<Pair<Object,T>> events()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the collection of received source-event pairs.
      Returns:
      the collection of sources and events received