Commit 5c26bc18 authored by Julian Zobel's avatar Julian Zobel
Browse files

Comments

parent 7b731771
......@@ -20,11 +20,20 @@
package de.tud.kom.p2psim.impl.util;
/**
* Like a {@link Tuple}, but one or both elements can be null. Used for a long time, never documented.
*
* @author ?
* @version ?
*
* @param <A>
* @param <B>
*/
public class Either<A, B> {
private A left = null;
private B right = null;
protected Either(A a,B b) {
protected Either(A a, B b) {
left = a;
right = b;
}
......
......@@ -20,7 +20,12 @@
package de.tud.kom.p2psim.impl.util;
/**
* It's a triple. Used for a long time, never documented.
*
* @version ?
* @author ?
*/
public class Triple<A, B, C> {
private A a;
......
......@@ -29,16 +29,24 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
public class Tuple<T1, T2> {
/**
* It's a tuple. Used for a long time, never documented.
*
* @version ?
* @author ?
* @param <A>
* @param <B>
*/
public class Tuple<A, B> {
T1 a;
T2 b;
A a;
B b;
public Tuple() {
}
public Tuple(T1 a, T2 b) {
public Tuple(A a, B b) {
super();
this.a = a;
this.b = b;
......@@ -49,16 +57,16 @@ public class Tuple<T1, T2> {
return "(" + a + ", " + b + ")";
}
public T1 getA() {
public A getA() {
return a;
}
public void setA(T1 a) {
public void setA(A a) {
this.a = a;
}
public T2 getB() {
public B getB() {
return b;
}
public void setB(T2 b) {
public void setB(B b) {
this.b = b;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment