diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-18 03:05:35 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-06-18 03:05:35 +0200 |
commit | caa49d174b48e48c675ba0e6409c4daf92445618 (patch) | |
tree | 1830197016893a754ddc2327634213512c48236b /src/jrummikub/util | |
parent | 626f4bd9ab6f9143851768b3b2f0a756a9d45f01 (diff) | |
download | JRummikub-caa49d174b48e48c675ba0e6409c4daf92445618.tar JRummikub-caa49d174b48e48c675ba0e6409c4daf92445618.zip |
Finished network game setup (without starting)
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@456 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/util')
-rw-r--r-- | src/jrummikub/util/Event1.java | 2 | ||||
-rw-r--r-- | src/jrummikub/util/Event2.java | 2 | ||||
-rw-r--r-- | src/jrummikub/util/Event3.java | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/jrummikub/util/Event1.java b/src/jrummikub/util/Event1.java index 5e3391c..f93d519 100644 --- a/src/jrummikub/util/Event1.java +++ b/src/jrummikub/util/Event1.java @@ -35,7 +35,7 @@ public class Event1<T> implements IEvent1<T> { * the event parameter */ public void emit(T value) { - for (IListener1<T> listener : listeners) { + for (IListener1<T> listener : new HashSet<IListener1<T>>(listeners)) { listener.handle(value); } } diff --git a/src/jrummikub/util/Event2.java b/src/jrummikub/util/Event2.java index 9bcee43..139f19f 100644 --- a/src/jrummikub/util/Event2.java +++ b/src/jrummikub/util/Event2.java @@ -39,7 +39,7 @@ public class Event2<T1, T2> implements IEvent2<T1, T2> { * the second event parameter */ public void emit(T1 value1, T2 value2) { - for (IListener2<T1, T2> listener : listeners) { + for (IListener2<T1, T2> listener : new HashSet<IListener2<T1, T2>>(listeners)) { listener.handle(value1, value2); } } diff --git a/src/jrummikub/util/Event3.java b/src/jrummikub/util/Event3.java index 38cdd07..9510e48 100644 --- a/src/jrummikub/util/Event3.java +++ b/src/jrummikub/util/Event3.java @@ -43,7 +43,7 @@ public class Event3<T1, T2, T3> implements IEvent3<T1, T2, T3> { * the third event parameter */ public void emit(T1 value1, T2 value2, T3 value3) { - for (IListener3<T1, T2, T3> listener : listeners) { + for (IListener3<T1, T2, T3> listener : new HashSet<IListener3<T1, T2, T3>>(listeners)) { listener.handle(value1, value2, value3); } } |