package models;

/**
 * 
 * Stolen from
 * http://stackoverflow.com/questions/521171/a-java-collection-of-value
 * -pairs-tuples
 */
@SuppressWarnings("javadoc")
public class Pair<L, R> {

    private final L left;
    private final R right;

    public Pair(L left, R right) {
	this.left = left;
	this.right = right;
    }

    public L getLeft() {
	return left;
    }

    public R getRight() {
	return right;
    }

    @Override
    public int hashCode() {
	return left.hashCode() ^ right.hashCode();
    }

    @Override
    public boolean equals(Object o) {
	if (o == null)
	    return false;
	if (!(o instanceof Pair))
	    return false;
	Pair pairo = (Pair) o;
	return this.left.equals(pairo.getLeft())
		&& this.right.equals(pairo.getRight());
    }

}
@@ -236,16 +236,82 @@
 right;%0A%0A
+    public Pair() %7B%0A%09this.left = null;%0A%09this.right = null;%0A    %7D%0A%0A
     publ

add default constructor to Pair - for json binding