summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/util')
-rw-r--r--src/jrummikub/util/Pair.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/jrummikub/util/Pair.java b/src/jrummikub/util/Pair.java
index 5fb8589..76eea4f 100644
--- a/src/jrummikub/util/Pair.java
+++ b/src/jrummikub/util/Pair.java
@@ -2,20 +2,34 @@ package jrummikub.util;
/**
* A pair of objects
+ * @param <T1> the first type of the pair
+ * @param <T2> the second type of the pair
*/
public class Pair<T1, T2> {
- final T1 first;
- final T2 second;
+ private final T1 first;
+ private final T2 second;
+ /**
+ * Create a new pair
+ *
+ * @param first the first value
+ * @param second the second value
+ */
public Pair(T1 first, T2 second) {
this.first = first;
this.second = second;
}
+ /**
+ * @return the first value
+ */
public T1 getFirst() {
return first;
}
+ /**
+ * @return the first value
+ */
public T2 getSecond() {
return second;
}