code: @Override
    public int compareTo(IntIntPair other) {
      int fdiff = this.first - other.first;
      if(fdiff != 0) {
        return fdiff;
      }
      return this.second - other.second;
    }
docs: Implementation of comparable interface, sorting by first then second.
  
  @param other Object to compare to
  @return comparison result