sdk/src/com/socialize/google/gdata/util/common/base/Preconditions.java
public static void checkPositionIndexes(int start, int end, int size) {
    checkPositionIndex(start, size, "start index");
    checkPositionIndex(end, size, "end index");
    if (end < start) {
      throw new IndexOutOfBoundsException(format(
          "end index (%s) must not be less than start index (%s)", end, start));
    }
  }
public static void checkPositionIndexes(int start, int end, int size) {
    checkPositionIndex(start, size, "start index");
    checkPositionIndex(end, size, "end index");
    if (end < start) {
      throw new IndexOutOfBoundsException(format(
          "end index (%s) must not be less than start index (%s)", end, start));
    }
  }
Ensures that {@code start} and {@code end} specify a valid <i>positions</i>
in an array, list or string of size {@code size}, and are in order. A
position index may range from zero to {@code size}, inclusive.

@param start a user-supplied index identifying a starting position in an
array, list or string
@param end a user-supplied index identifying a ending position in an array,
list or string
@param size the size of that array, list or string
@throws IndexOutOfBoundsException if either index is negative or is
greater than {@code size}, or if {@code end} is less than {@code start}
@throws IllegalArgumentException if {@code size} is negative