@Override
    public int compareTo(Object o) {
        try{
            Pair p = (Pair)o;

            //if(p.first == this.first && p.second == this.second)
            if(p.first.equals(this.first) && p.second.equals(this.second))
                return 0;

        }catch(ClassCastException e)
        {
            //Whatever this is, this is not a Pair. So, not equal at all.
            return -1;
        }
        return -1; //Not sure what would the order be, so always -1.
    }