Package VASSAL.tools.concurrent.listener
Class EventAccumulator<T>
java.lang.Object
VASSAL.tools.concurrent.listener.EventAccumulator<T>
- All Implemented Interfaces:
EventListener<T>
public class EventAccumulator<T> extends Object implements EventListener<T>
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 Collection<Pair<Object,T>>col -
Constructor Summary
Constructors Constructor Description EventAccumulator()EventAccumulator(Collection<Pair<Object,T>> col) -
Method Summary
-
Field Details
-
col
-
-
Constructor Details
-
EventAccumulator
public EventAccumulator() -
EventAccumulator
-
-
Method Details
-
receive
Receive notification of an event.- Specified by:
receivein interfaceEventListener<T>- Parameters:
src- the source of the eventevent- the event
-
events
Gets the collection of received source-event pairs.- Returns:
- the collection of sources and events received
-