Lines Matching refs:fromIndex

106 // Android-changed: Inlined methods; CME in iterators; throw AIOOBE when toIndex < fromIndex.
117 * Throw AIOOBE when toIndex < fromIndex.
631 * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive.
633 * This call shortens the list by {@code (toIndex - fromIndex)} elements.
634 * (If {@code toIndex==fromIndex}, this operation has no effect.)
636 * @throws IndexOutOfBoundsException if {@code fromIndex} or
638 * ({@code fromIndex < 0 ||
639 * fromIndex >= size() ||
641 * toIndex < fromIndex})
643 protected void removeRange(int fromIndex, int toIndex) {
644 // Android-changed: Throw an IOOBE if toIndex < fromIndex as documented.
647 if (toIndex < fromIndex) {
648 throw new IndexOutOfBoundsException("toIndex < fromIndex");
653 System.arraycopy(elementData, toIndex, elementData, fromIndex,
657 int newSize = size - (toIndex-fromIndex);
980 * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If
981 * {@code fromIndex} and {@code toIndex} are equal, the returned list is
1007 public List<E> subList(int fromIndex, int toIndex) {
1008 subListRangeCheck(fromIndex, toIndex, size);
1009 return new SubList(this, 0, fromIndex, toIndex);
1012 static void subListRangeCheck(int fromIndex, int toIndex, int size) {
1013 if (fromIndex < 0)
1014 throw new IndexOutOfBoundsException("fromIndex = " + fromIndex);
1017 if (fromIndex > toIndex)
1018 throw new IllegalArgumentException("fromIndex(" + fromIndex +
1029 int offset, int fromIndex, int toIndex) {
1031 this.parentOffset = fromIndex;
1032 this.offset = offset + fromIndex;
1033 this.size = toIndex - fromIndex;
1082 protected void removeRange(int fromIndex, int toIndex) {
1085 parent.removeRange(parentOffset + fromIndex,
1088 this.size -= toIndex - fromIndex;
1237 public List<E> subList(int fromIndex, int toIndex) {
1238 subListRangeCheck(fromIndex, toIndex, size);
1239 return new SubList(this, offset, fromIndex, toIndex);