/**
 * Part of the CCNx Java Library.
 *
 * Copyright (C) 2008, 2009, 2010 Palo Alto Research Center, Inc.
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License version 2.1
 * as published by the Free Software Foundation. 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details. You should have received
 * a copy of the GNU Lesser General Public License along with this library;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301 USA.
 */
package org.ccnx.ccn.impl.support;

public class Tuple<A, B> {
	
	A _first;
	B _second;
	
	public Tuple(A first, B second) {
		_first = first;
		_second = second;
	}
	
	public A first() { return _first; }
	public B second() { return _second; }
	public void setFirst(A first) { _first = first; }
	public void setSecond(B second) { _second = second; }
}
@@ -812,16 +812,120 @@
 pport;%0A%0A
+/**%0A * Utility class to represent pairs of objects, most commonly as return%0A * values from methods.%0A */%0A
 public c
@@ -1229,10 +1229,751 @@
 econd; %7D
+%0A%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09final int prime = 31;%0A%09%09int result = 1;%0A%09%09result = prime * result + ((_first == null) ? 0 : _first.hashCode());%0A%09%09result = prime * result + ((_second == null) ? 0 : _second.hashCode());%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public boolean equals(Object obj) %7B%0A%09%09if (this == obj)%0A%09%09%09return true;%0A%09%09if (obj == null)%0A%09%09%09return false;%0A%09%09if (getClass() != obj.getClass())%0A%09%09%09return false;%0A%09%09Tuple%3C?,?%3E other = (Tuple%3C?,?%3E) obj;%0A%09%09if (_first == null) %7B%0A%09%09%09if (other._first != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!_first.equals(other._first))%0A%09%09%09return false;%0A%09%09if (_second == null) %7B%0A%09%09%09if (other._second != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!_second.equals(other._second))%0A%09%09%09return false;%0A%09%09return true;%0A%09%7D
 %0A%7D

Add hashCode and equals to Tuple.