public int compareTo(Pair<L, R> other) {
      return new CompareToBuilder().append(getLeft(), other.getLeft())
              .append(getRight(), other.getRight()).toComparison();
    }
<p>Compares the pair based on the left element followed by the right element.
The types must be {@code Comparable}.</p>

@param other  the other pair, not null
@return negative if this is less, zero if equal, positive if greater
android/android_framework/base/src/main/java/lang3/tuple/Pair.java