summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/util')
-rw-r--r--src/jrummikub/util/Event.java2
-rw-r--r--src/jrummikub/util/Event1.java2
-rw-r--r--src/jrummikub/util/Event2.java4
-rw-r--r--src/jrummikub/util/IEvent.java1
-rw-r--r--src/jrummikub/util/IEvent1.java1
-rw-r--r--src/jrummikub/util/IEvent2.java1
-rw-r--r--src/jrummikub/util/Pair.java29
7 files changed, 21 insertions, 19 deletions
diff --git a/src/jrummikub/util/Event.java b/src/jrummikub/util/Event.java
index 0b2317f..1a68eac 100644
--- a/src/jrummikub/util/Event.java
+++ b/src/jrummikub/util/Event.java
@@ -4,7 +4,7 @@ import java.util.HashSet;
public class Event implements IEvent {
private HashSet<IListener> listeners = new HashSet<IListener>();
-
+
@Override
public void add(IListener listener) {
listeners.add(listener);
diff --git a/src/jrummikub/util/Event1.java b/src/jrummikub/util/Event1.java
index e8ccb43..f0595f9 100644
--- a/src/jrummikub/util/Event1.java
+++ b/src/jrummikub/util/Event1.java
@@ -4,7 +4,7 @@ import java.util.HashSet;
public class Event1<T> implements IEvent1<T> {
private HashSet<IListener1<T>> listeners = new HashSet<IListener1<T>>();
-
+
@Override
public void add(IListener1<T> listener) {
listeners.add(listener);
diff --git a/src/jrummikub/util/Event2.java b/src/jrummikub/util/Event2.java
index 19d2d58..c7ca8e7 100644
--- a/src/jrummikub/util/Event2.java
+++ b/src/jrummikub/util/Event2.java
@@ -3,8 +3,8 @@ package jrummikub.util;
import java.util.HashSet;
public class Event2<T1, T2> implements IEvent2<T1, T2> {
-private HashSet<IListener2<T1, T2>> listeners = new HashSet<IListener2<T1, T2>>();
-
+ private HashSet<IListener2<T1, T2>> listeners = new HashSet<IListener2<T1, T2>>();
+
@Override
public void add(IListener2<T1, T2> listener) {
listeners.add(listener);
diff --git a/src/jrummikub/util/IEvent.java b/src/jrummikub/util/IEvent.java
index ce0e13d..2295118 100644
--- a/src/jrummikub/util/IEvent.java
+++ b/src/jrummikub/util/IEvent.java
@@ -2,5 +2,6 @@ package jrummikub.util;
public interface IEvent {
public void add(IListener listener);
+
public void remove(IListener listener);
}
diff --git a/src/jrummikub/util/IEvent1.java b/src/jrummikub/util/IEvent1.java
index 47075db..4108078 100644
--- a/src/jrummikub/util/IEvent1.java
+++ b/src/jrummikub/util/IEvent1.java
@@ -2,5 +2,6 @@ package jrummikub.util;
public interface IEvent1<T> {
public void add(IListener1<T> listener);
+
public void remove(IListener1<T> listener);
}
diff --git a/src/jrummikub/util/IEvent2.java b/src/jrummikub/util/IEvent2.java
index f677a2d..ac68c4f 100644
--- a/src/jrummikub/util/IEvent2.java
+++ b/src/jrummikub/util/IEvent2.java
@@ -2,5 +2,6 @@ package jrummikub.util;
public interface IEvent2<T1, T2> {
public void add(IListener2<T1, T2> listener);
+
public void remove(IListener2<T1, T2> listener);
}
diff --git a/src/jrummikub/util/Pair.java b/src/jrummikub/util/Pair.java
index 95af113..5fb8589 100644
--- a/src/jrummikub/util/Pair.java
+++ b/src/jrummikub/util/Pair.java
@@ -4,21 +4,20 @@ package jrummikub.util;
* A pair of objects
*/
public class Pair<T1, T2> {
- final T1 first;
- final T2 second;
-
- public Pair(T1 first, T2 second) {
- this.first = first;
- this.second = second;
- }
+ final T1 first;
+ final T2 second;
- public T1 getFirst() {
- return first;
- }
+ public Pair(T1 first, T2 second) {
+ this.first = first;
+ this.second = second;
+ }
+
+ public T1 getFirst() {
+ return first;
+ }
+
+ public T2 getSecond() {
+ return second;
+ }
- public T2 getSecond() {
- return second;
- }
-
-
}