/**
 * Pair.java
 * Theodoros Lappas
 * http://www.cs.ucr.edu/~tlappas/
 */
package solver;

public class Pair<Key, Value> implements Comparable<Pair<Key, Value>> {

	public Key key;
	public Value val;

	public Pair(Key k, Value v) {
		key = k;
		val = v;
	}

	public int compareTo(Pair<Key, Value> p) {
		if ((Float) key < (Float) p.key) {
			return +1;
		} else if ((Float) key == (Float) p.key) {
			return -0;
		} else {
			return -1;
		}
	}
}
