docs: @SuppressWarnings("unchecked")
    public int compareTo(Pair<T1,T2> another) {
      int comp = ((Comparable<T1>) first()).compareTo(another.first());
      if (comp != 0) {
        return comp;
      } else {
        return ((Comparable<T2>) second()).compareTo(another.second());
      }
    }