public boolean equals(Object rhs)
    {
    	if(rhs instanceof Pair<?,?>)
    	{
    		Pair<?,?> prhs = (Pair<?,?>) rhs;
    		return (first().equals(prhs.first()) &&
		    second().equals(prhs.second()));
    	}
    	else return false;
    }