public void sort() {
    throwIfImmutable();

    if (!sorted) {
      Arrays.sort(values, 0, size);
      sorted = true;
    }
  }
Sorts the elements in the list in-place.
android/android_framework/dex-maker/src/main/java/com/android/dx/util/IntList.java