X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=support%2Fgeneral%2Fsrc%2Ftest%2Fjava%2Forg%2Fwamblee%2Ftest%2FEventTracker.java;h=37a4c76ae3326e4aac786264cfaa0c01f42637ad;hb=8de36ff0206c996baf3ee4adc3e2293b12ff5f39;hp=94d2f19fa60efadd2889200208a7ab86a5f75d7b;hpb=ddd261f331280640c5b53c7128230b629ebcd268;p=utils diff --git a/support/general/src/test/java/org/wamblee/test/EventTracker.java b/support/general/src/test/java/org/wamblee/test/EventTracker.java index 94d2f19f..37a4c76a 100644 --- a/support/general/src/test/java/org/wamblee/test/EventTracker.java +++ b/support/general/src/test/java/org/wamblee/test/EventTracker.java @@ -24,21 +24,20 @@ import java.util.HashMap; import java.util.List; import java.util.Map; - /** * Tracks the occurence of certain events in a test environment. Threads in a * test environment tell the event tracker of the occurrence of certain events * using {@link #eventOccurred(Event)}. Test code inspects the events sent by a * thread using {@link #isEventSent(Thread, Event)}. - * + * * A record is kept of every event which is sent. Therefore, the occurrence of a * new event does not erase a previously sent event. - * + * * @param * Type of event sent from test code. Usually String will be * sufficient. The event type must provide a sensible implementation * of {@link java.lang.Object#equals(java.lang.Object)}. - * + * * @author Erik Brakkee */ public class EventTracker { @@ -51,7 +50,7 @@ public class EventTracker { /** * Constructs the event tracker. - * + * */ public EventTracker() { clear(); @@ -63,7 +62,7 @@ public class EventTracker { /** * Called by a thread to inform that an event has occurred. - * + * * @param aEvent * Event that was sent. */ @@ -83,7 +82,7 @@ public class EventTracker { /** * Checks if a specific event has happened in a specific thread. - * + * * @param aThread * Thread to check. * @param aEvent @@ -102,7 +101,7 @@ public class EventTracker { /** * Gets the events for a thread in the order they were sent - * + * * @param aThread * Thread to get events for. * @return Events that were sent. A zero-sized array is returned if no @@ -119,9 +118,8 @@ public class EventTracker { } /** - * Gets the number of times an event was sent summed up - * over all threads. - * + * Gets the number of times an event was sent summed up over all threads. + * * @param aEvent * Event to check. * @return Number of times it was reached. @@ -144,6 +142,7 @@ public class EventTracker { /** * Gets the total event count over all threads. + * * @return */ public synchronized int getEventCount() {