Lines Matching defs:toIndex

605      * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive.
607 * This call shortens the list by {@code (toIndex - fromIndex)} elements.
608 * (If {@code toIndex==fromIndex}, this operation has no effect.)
611 * {@code toIndex} is out of range
614 * toIndex > size() ||
615 * toIndex < fromIndex})
617 protected void removeRange(int fromIndex, int toIndex) {
618 // Android-changed : Throw an IOOBE if toIndex < fromIndex as documented.
621 if (toIndex < fromIndex) {
622 throw new IndexOutOfBoundsException("toIndex < fromIndex");
626 int numMoved = size - toIndex;
627 System.arraycopy(elementData, toIndex, elementData, fromIndex,
631 int newSize = size - (toIndex-fromIndex);
951 * {@code fromIndex}, inclusive, and {@code toIndex}, exclusive. (If
952 * {@code fromIndex} and {@code toIndex} are equal, the returned list is
978 public List<E> subList(int fromIndex, int toIndex) {
979 subListRangeCheck(fromIndex, toIndex, size);
980 return new SubList(this, 0, fromIndex, toIndex);
983 static void subListRangeCheck(int fromIndex, int toIndex, int size) {
986 if (toIndex > size)
987 throw new IndexOutOfBoundsException("toIndex = " + toIndex);
988 if (fromIndex > toIndex)
990 ") > toIndex(" + toIndex + ")");
1000 int offset, int fromIndex, int toIndex) {
1004 this.size = toIndex - fromIndex;
1053 protected void removeRange(int fromIndex, int toIndex) {
1057 parentOffset + toIndex);
1059 this.size -= toIndex - fromIndex;
1208 public List<E> subList(int fromIndex, int toIndex) {
1209 subListRangeCheck(fromIndex, toIndex, size);
1210 return new SubList(this, offset, fromIndex, toIndex);