Lines Matching defs:toIndex

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.)
637 * {@code toIndex} is out of range
640 * toIndex > 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");
652 int numMoved = size - toIndex;
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) {
1015 if (toIndex > size)
1016 throw new IndexOutOfBoundsException("toIndex = " + toIndex);
1017 if (fromIndex > toIndex)
1019 ") > toIndex(" + toIndex + ")");
1029 int offset, int fromIndex, int toIndex) {
1033 this.size = toIndex - fromIndex;
1082 protected void removeRange(int fromIndex, int toIndex) {
1086 parentOffset + toIndex);
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);