summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/util')
-rw-r--r--src/jrummikub/util/Event3.java12
-rw-r--r--src/jrummikub/util/IEvent3.java10
-rw-r--r--src/jrummikub/util/IListener3.java12
3 files changed, 22 insertions, 12 deletions
diff --git a/src/jrummikub/util/Event3.java b/src/jrummikub/util/Event3.java
index f500495..38cdd07 100644
--- a/src/jrummikub/util/Event3.java
+++ b/src/jrummikub/util/Event3.java
@@ -6,9 +6,11 @@ import java.util.HashSet;
* Simple single parameter event generator
*
* @param <T1>
- * type of the first event parameter
+ * type of the first event parameter
* @param <T2>
- * type of the second event parameter
+ * type of the second event parameter
+ * @param <T3>
+ * type of third event parameter
*/
public class Event3<T1, T2, T3> implements IEvent3<T1, T2, T3> {
private HashSet<IListener3<T1, T2, T3>> listeners = new HashSet<IListener3<T1, T2, T3>>();
@@ -34,9 +36,11 @@ public class Event3<T1, T2, T3> implements IEvent3<T1, T2, T3> {
* Generate a single event
*
* @param value1
- * the first event parameter
+ * the first event parameter
* @param value2
- * the second event parameter
+ * the second event parameter
+ * @param value3
+ * the third event parameter
*/
public void emit(T1 value1, T2 value2, T3 value3) {
for (IListener3<T1, T2, T3> listener : listeners) {
diff --git a/src/jrummikub/util/IEvent3.java b/src/jrummikub/util/IEvent3.java
index 47ef1cd..a78223d 100644
--- a/src/jrummikub/util/IEvent3.java
+++ b/src/jrummikub/util/IEvent3.java
@@ -4,16 +4,18 @@ package jrummikub.util;
* Interface for classes that can generate events having a two parameters
*
* @param <T1>
- * type of the first event parameter
+ * type of the first event parameter
* @param <T2>
- * type of the second event parameter
+ * type of the second event parameter
+ * @param <T3>
+ * type of third event parameter
*/
public interface IEvent3<T1, T2, T3> {
/**
* Start to publish all events to a given listener
*
* @param listener
- * target listener
+ * target listener
* @return a connection to remove the listener
*/
public Connection add(IListener3<T1, T2, T3> listener);
@@ -22,7 +24,7 @@ public interface IEvent3<T1, T2, T3> {
* Stop publishing events to a given listener
*
* @param listener
- * target listener
+ * target listener
*/
public void remove(IListener3<T1, T2, T3> listener);
}
diff --git a/src/jrummikub/util/IListener3.java b/src/jrummikub/util/IListener3.java
index a4f8474..0b6b8c9 100644
--- a/src/jrummikub/util/IListener3.java
+++ b/src/jrummikub/util/IListener3.java
@@ -5,18 +5,22 @@ package jrummikub.util;
* parameters
*
* @param <T1>
- * type of the first event parameter
+ * type of the first event parameter
* @param <T2>
- * type of the first event parameter
+ * type of the second event parameter
+ * @param <T3>
+ * type of third event parameter
*/
public interface IListener3<T1, T2, T3> {
/**
* This method is called whenever a class we're listening to emits an event
*
* @param value1
- * the first event parameter
+ * the first event parameter
* @param value2
- * the second event parameter
+ * the second event parameter
+ * @param value3
+ * the third event parameter
*/
public void handle(T1 value1, T2 value2, T3 value3);
}