Home
last modified time | relevance | path

Searched refs:toIndex (Results 1 – 25 of 28) sorted by relevance

12

/libcore/ojluni/src/main/java/java/util/
DArrays.java114 private static void rangeCheck(int arrayLength, int fromIndex, int toIndex) { in rangeCheck() argument
115 if (fromIndex > toIndex) { in rangeCheck()
117 "fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")"); in rangeCheck()
122 if (toIndex > arrayLength) { in rangeCheck()
123 throw new ArrayIndexOutOfBoundsException(toIndex); in rangeCheck()
170 public static void sort(int[] a, int fromIndex, int toIndex) { in sort() argument
171 rangeCheck(a.length, fromIndex, toIndex); in sort()
172 DualPivotQuicksort.sort(a, fromIndex, toIndex - 1, null, 0, 0); in sort()
210 public static void sort(long[] a, int fromIndex, int toIndex) { in sort() argument
211 rangeCheck(a.length, fromIndex, toIndex); in sort()
[all …]
DAbstractList.java496 public List<E> subList(int fromIndex, int toIndex) { in subList() argument
497 subListRangeCheck(fromIndex, toIndex, size()); in subList()
499 new RandomAccessSubList<>(this, fromIndex, toIndex) : in subList()
500 new SubList<>(this, fromIndex, toIndex)); in subList()
503 static void subListRangeCheck(int fromIndex, int toIndex, int size) { in subListRangeCheck() argument
506 if (toIndex > size) in subListRangeCheck()
507 throw new IndexOutOfBoundsException("toIndex = " + toIndex); in subListRangeCheck()
508 if (fromIndex > toIndex) in subListRangeCheck()
510 ") > toIndex(" + toIndex + ")"); in subListRangeCheck()
594 protected void removeRange(int fromIndex, int toIndex) { in removeRange() argument
[all …]
DBitSet.java360 private static void checkRange(int fromIndex, int toIndex) { in checkRange() argument
363 if (toIndex < 0) in checkRange()
364 throw new IndexOutOfBoundsException("toIndex < 0: " + toIndex); in checkRange()
365 if (fromIndex > toIndex) in checkRange()
367 " > toIndex: " + toIndex); in checkRange()
403 public void flip(int fromIndex, int toIndex) { in flip() argument
404 checkRange(fromIndex, toIndex); in flip()
406 if (fromIndex == toIndex) in flip()
410 int endWordIndex = wordIndex(toIndex - 1); in flip()
414 long lastWordMask = WORD_MASK >>> -toIndex; in flip()
[all …]
DArrayList.java643 protected void removeRange(int fromIndex, int toIndex) { in removeRange() argument
647 if (toIndex < fromIndex) { in removeRange()
652 int numMoved = size - toIndex; in removeRange()
653 System.arraycopy(elementData, toIndex, elementData, fromIndex, in removeRange()
657 int newSize = size - (toIndex-fromIndex); in removeRange()
1007 public List<E> subList(int fromIndex, int toIndex) { in subList() argument
1008 subListRangeCheck(fromIndex, toIndex, size); in subList()
1009 return new SubList(this, 0, fromIndex, toIndex); in subList()
1012 static void subListRangeCheck(int fromIndex, int toIndex, int size) { in subListRangeCheck() argument
1015 if (toIndex > size) in subListRangeCheck()
[all …]
DImmutableCollections.java112 public List<E> subList(int fromIndex, int toIndex) { in subList() argument
114 subListRangeCheck(fromIndex, toIndex, size); in subList()
115 return SubList.fromList(this, fromIndex, toIndex); in subList()
118 static void subListRangeCheck(int fromIndex, int toIndex, int size) { in subListRangeCheck() argument
121 if (toIndex > size) in subListRangeCheck()
122 throw new IndexOutOfBoundsException("toIndex = " + toIndex); in subListRangeCheck()
123 if (fromIndex > toIndex) in subListRangeCheck()
125 ") > toIndex(" + toIndex + ")"); in subListRangeCheck()
318 static <E> SubList<E> fromSubList(SubList<E> parent, int fromIndex, int toIndex) { in fromSubList() argument
319 return new SubList<>(parent.root, parent.offset + fromIndex, toIndex - fromIndex); in fromSubList()
[all …]
DJumboEnumSet.java56 int toIndex = to.ordinal() >>> 6; in addRange() local
58 if (fromIndex == toIndex) { in addRange()
63 for (int i = fromIndex + 1; i < toIndex; i++) in addRange()
65 elements[toIndex] = -1L >>> (63 - to.ordinal()); in addRange()
DSpliterators.java175 public static <T> Spliterator<T> spliterator(Object[] array, int fromIndex, int toIndex, in spliterator() argument
177 checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex); in spliterator() local
178 return new ArraySpliterator<>(array, fromIndex, toIndex, additionalCharacteristics); in spliterator()
237 public static Spliterator.OfInt spliterator(int[] array, int fromIndex, int toIndex, in spliterator() argument
239 checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex); in spliterator() local
240 return new IntArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics); in spliterator()
303 public static Spliterator.OfLong spliterator(long[] array, int fromIndex, int toIndex, in spliterator() argument
305 checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex); in spliterator() local
306 return new LongArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics); in spliterator()
369 public static Spliterator.OfDouble spliterator(double[] array, int fromIndex, int toIndex, in spliterator() argument
[all …]
DObjects.java397 int checkFromToIndex(int fromIndex, int toIndex, int length) { in checkFromToIndex() argument
398 return Preconditions.checkFromToIndex(fromIndex, toIndex, length, null); in checkFromToIndex()
DVector.java1037 public synchronized List<E> subList(int fromIndex, int toIndex) { in subList() argument
1038 return Collections.synchronizedList(super.subList(fromIndex, toIndex), in subList()
1049 protected synchronized void removeRange(int fromIndex, int toIndex) { in removeRange() argument
1051 int numMoved = elementCount - toIndex; in removeRange()
1052 System.arraycopy(elementData, toIndex, elementData, fromIndex, in removeRange()
1056 int newElementCount = elementCount - (toIndex-fromIndex); in removeRange()
DCollections.java1412 public List<E> subList(int fromIndex, int toIndex) { in subList() argument
1413 return new UnmodifiableList<>(list.subList(fromIndex, toIndex)); in subList()
1445 public List<E> subList(int fromIndex, int toIndex) {
1447 list.subList(fromIndex, toIndex));
2499 public List<E> subList(int fromIndex, int toIndex) {
2501 return new SynchronizedList<>(list.subList(fromIndex, toIndex),
2549 public List<E> subList(int fromIndex, int toIndex) {
2552 list.subList(fromIndex, toIndex), mutex);
3528 public List<E> subList(int fromIndex, int toIndex) {
3529 return new CheckedList<>(list.subList(fromIndex, toIndex), type);
[all …]
/libcore/ojluni/annotations/hiddenapi/java/util/
DArrays.java38 private static void rangeCheck(int arrayLength, int fromIndex, int toIndex) { in rangeCheck() argument
46 public static void sort(int[] a, int fromIndex, int toIndex) { in sort() argument
54 public static void sort(long[] a, int fromIndex, int toIndex) { in sort() argument
62 public static void sort(short[] a, int fromIndex, int toIndex) { in sort() argument
70 public static void sort(char[] a, int fromIndex, int toIndex) { in sort() argument
78 public static void sort(byte[] a, int fromIndex, int toIndex) { in sort() argument
86 public static void sort(float[] a, int fromIndex, int toIndex) { in sort() argument
94 public static void sort(double[] a, int fromIndex, int toIndex) { in sort() argument
102 public static void parallelSort(byte[] a, int fromIndex, int toIndex) { in parallelSort() argument
110 public static void parallelSort(char[] a, int fromIndex, int toIndex) { in parallelSort() argument
[all …]
DArrayList.java146 protected void removeRange(int fromIndex, int toIndex) { in removeRange() argument
187 public java.util.List<E> subList(int fromIndex, int toIndex) { in subList() argument
191 static void subListRangeCheck(int fromIndex, int toIndex, int size) { in subListRangeCheck() argument
351 SubList(java.util.AbstractList<E> parent, int offset, int fromIndex, int toIndex) { in SubList() argument
375 protected void removeRange(int fromIndex, int toIndex) { in removeRange() argument
395 public java.util.List<E> subList(int fromIndex, int toIndex) { in subList() argument
DVector.java230 public synchronized java.util.List<E> subList(int fromIndex, int toIndex) { in subList() argument
234 protected synchronized void removeRange(int fromIndex, int toIndex) { in removeRange() argument
/libcore/ojluni/annotations/sdk/nullability/java/util/
DArrays.annotated.java48 public static void sort(int @libcore.util.NonNull [] a, int fromIndex, int toIndex) { throw new Run… in sort() argument
52 public static void sort(long @libcore.util.NonNull [] a, int fromIndex, int toIndex) { throw new Ru… in sort() argument
56 public static void sort(short @libcore.util.NonNull [] a, int fromIndex, int toIndex) { throw new R… in sort() argument
60 public static void sort(char @libcore.util.NonNull [] a, int fromIndex, int toIndex) { throw new Ru… in sort() argument
64 public static void sort(byte @libcore.util.NonNull [] a, int fromIndex, int toIndex) { throw new Ru… in sort() argument
68 public static void sort(float @libcore.util.NonNull [] a, int fromIndex, int toIndex) { throw new R… in sort() argument
72 public static void sort(double @libcore.util.NonNull [] a, int fromIndex, int toIndex) { throw new … in sort() argument
76 public static void parallelSort(byte @libcore.util.NonNull [] a, int fromIndex, int toIndex) { thro… in parallelSort() argument
80 public static void parallelSort(char @libcore.util.NonNull [] a, int fromIndex, int toIndex) { thro… in parallelSort() argument
84 public static void parallelSort(short @libcore.util.NonNull [] a, int fromIndex, int toIndex) { thr… in parallelSort() argument
[all …]
DAbstractList.annotated.java59 ….util.List<@libcore.util.NullFromTypeParam E> subList(int fromIndex, int toIndex) { throw new Runt… in subList() argument
65 protected void removeRange(int fromIndex, int toIndex) { throw new RuntimeException("Stub!"); } in removeRange() argument
DArrayList.annotated.java79 protected void removeRange(int fromIndex, int toIndex) { throw new RuntimeException("Stub!"); } in removeRange() argument
91 ….util.List<@libcore.util.NullFromTypeParam E> subList(int fromIndex, int toIndex) { throw new Runt… in subList() argument
DVector.annotated.java121 ….util.List<@libcore.util.NullFromTypeParam E> subList(int fromIndex, int toIndex) { throw new Runt… in subList() argument
123 protected synchronized void removeRange(int fromIndex, int toIndex) { throw new RuntimeException("S… in removeRange() argument
/libcore/ojluni/src/main/java/jdk/internal/util/
DPreconditions.java73 int fromIndex, int toIndex, int length) { in outOfBoundsCheckFromToIndex() argument
74 return outOfBounds(oobe, "checkFromToIndex", fromIndex, toIndex, length); in outOfBoundsCheckFromToIndex()
291 int checkFromToIndex(int fromIndex, int toIndex, int length,
293 if (fromIndex < 0 || fromIndex > toIndex || toIndex > length)
294 throw outOfBoundsCheckFromToIndex(oobef, fromIndex, toIndex, length);
/libcore/ojluni/src/main/java/java/util/concurrent/
DCopyOnWriteArrayList.java556 void removeRange(int fromIndex, int toIndex) { in removeRange() argument
561 if (fromIndex < 0 || toIndex > len || toIndex < fromIndex) in removeRange()
563 int newlen = len - (toIndex - fromIndex); in removeRange()
564 int numMoved = len - toIndex; in removeRange()
570 System.arraycopy(elements, toIndex, newElements, in removeRange()
1154 public List<E> subList(int fromIndex, int toIndex) { in subList() argument
1158 if (fromIndex < 0 || toIndex > len || fromIndex > toIndex) in subList()
1160 return new COWSubList<E>(this, fromIndex, toIndex); in subList()
1190 int fromIndex, int toIndex) { in COWSubList() argument
1195 size = toIndex - fromIndex; in COWSubList()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/
DCopyOnWriteArrayList.java151 void removeRange(int fromIndex, int toIndex) { in removeRange() argument
244 public java.util.List<E> subList(int fromIndex, int toIndex) { in subList() argument
335 COWSubList(java.util.concurrent.CopyOnWriteArrayList<E> list, int fromIndex, int toIndex) { in COWSubList() argument
383 public java.util.List<E> subList(int fromIndex, int toIndex) { in subList() argument
/libcore/ojluni/src/main/java/sun/misc/
DJarIndex.java340 public void merge(JarIndex toIndex, String path) { in merge() argument
352 toIndex.addMapping(packageName, jarName); in merge()
/libcore/luni/src/test/java/libcore/java/util/
DObjectsTest.java86 private static void assertFromToIndexOutOfBounds(int fromIndex, int toIndex, int length) { in assertFromToIndexOutOfBounds() argument
88 Objects.checkFromToIndex(fromIndex, toIndex, length); in assertFromToIndexOutOfBounds()
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DJarIndex.java95 public void merge(sun.misc.JarIndex toIndex, java.lang.String path) { in merge() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DConcurrentModTest.java647 public void removeRange(int fromIndex, int toIndex) { in removeRange() argument
648 super.removeRange(fromIndex, toIndex); in removeRange()
/libcore/ojluni/annotations/sdk/nullability/java/util/concurrent/
DCopyOnWriteArrayList.annotated.java124 ….util.List<@libcore.util.NullFromTypeParam E> subList(int fromIndex, int toIndex) { throw new Runt… in subList() argument

12