@SuppressWarnings("unchecked")
  public int compareTo(final IdentityArrayList<? extends K> l) {
    final int s1 = size(), s2 = l.size();
    final K[] a1 = a, a2 = l.a;
    K e1, e2;
    int r, i;
    for (i = 0; i < s1 && i < s2; i++) {
      e1 = a1[i];
      e2 = a2[i];
      if ((r = (((Comparable<K>) (e1)).compareTo(e2))) != 0) {
        return r;
      }
    }
    return i < s2 ? -1 : (i < s1 ? 1 : 0);
  }
Compares this array list to another array list.

<P>
This method exists only for sake of efficiency. The implementation inherited from the abstract
implementation would already work.

@param l an array list.
@return a negative integer, zero, or a positive integer as this list is lexicographically less
        than, equal to, or greater than the argument.
geode-core/src/main/java/org/apache/geode/internal/cache/IdentityArrayList.java