Home
last modified time | relevance | path

Searched refs:fromIndex (Results 1 – 25 of 35) sorted by relevance

12

/libcore/ojluni/src/main/java/java/util/
DBitSet.java360 private static void checkRange(int fromIndex, int toIndex) { in checkRange() argument
361 if (fromIndex < 0) in checkRange()
362 throw new IndexOutOfBoundsException("fromIndex < 0: " + fromIndex); in checkRange()
365 if (fromIndex > toIndex) in checkRange()
366 throw new IndexOutOfBoundsException("fromIndex: " + fromIndex + 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()
409 int startWordIndex = wordIndex(fromIndex); in flip()
413 long firstWordMask = WORD_MASK << fromIndex; in flip()
[all …]
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()
119 if (fromIndex < 0) { in rangeCheck()
120 throw new ArrayIndexOutOfBoundsException(fromIndex); 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
504 if (fromIndex < 0) in subListRangeCheck()
505 throw new IndexOutOfBoundsException("fromIndex = " + fromIndex); in subListRangeCheck()
508 if (fromIndex > toIndex) in subListRangeCheck()
509 throw new IllegalArgumentException("fromIndex(" + fromIndex + in subListRangeCheck()
594 protected void removeRange(int fromIndex, int toIndex) { in removeRange() argument
[all …]
DArrayList.java643 protected void removeRange(int fromIndex, int toIndex) { in removeRange() argument
647 if (toIndex < fromIndex) { 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
1013 if (fromIndex < 0) in subListRangeCheck()
1014 throw new IndexOutOfBoundsException("fromIndex = " + fromIndex); in subListRangeCheck()
[all …]
DObjects.java397 int checkFromToIndex(int fromIndex, int toIndex, int length) { in checkFromToIndex() argument
398 return Preconditions.checkFromToIndex(fromIndex, toIndex, length, null); in checkFromToIndex()
423 int checkFromIndexSize(int fromIndex, int size, int length) { in checkFromIndexSize() argument
424 return Preconditions.checkFromIndexSize(fromIndex, size, length, null); in checkFromIndexSize()
DJumboEnumSet.java55 int fromIndex = from.ordinal() >>> 6; in addRange() local
58 if (fromIndex == toIndex) { in addRange()
59 elements[fromIndex] = (-1L >>> (from.ordinal() - to.ordinal() - 1)) in addRange()
62 elements[fromIndex] = (-1L << from.ordinal()); in addRange()
63 for (int i = fromIndex + 1; i < toIndex; i++) 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 …]
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
1052 System.arraycopy(elementData, toIndex, elementData, fromIndex, in removeRange()
1056 int newElementCount = elementCount - (toIndex-fromIndex); in removeRange()
/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
/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()
79 int fromIndex, int size, int length) { in outOfBoundsCheckFromIndexSize() argument
80 return outOfBounds(oobe, "checkFromIndexSize", fromIndex, size, length); in outOfBoundsCheckFromIndexSize()
291 int checkFromToIndex(int fromIndex, int toIndex, int length,
293 if (fromIndex < 0 || fromIndex > toIndex || toIndex > length)
294 throw outOfBoundsCheckFromToIndex(oobef, fromIndex, toIndex, length);
295 return fromIndex;
339 int checkFromIndexSize(int fromIndex, int size, int length,
341 if ((length | fromIndex | size) < 0 || size > length - fromIndex)
[all …]
/libcore/ojluni/src/main/java/java/lang/
DString.java1541 public int indexOf(int ch, int fromIndex) { in indexOf() argument
1543 if (fromIndex < 0) { in indexOf()
1544 fromIndex = 0; in indexOf()
1545 } else if (fromIndex >= max) { in indexOf()
1553 for (int i = fromIndex; i < max; i++) { in indexOf()
1560 return indexOfSupplementary(ch, fromIndex); in indexOf()
1567 private int indexOfSupplementary(int ch, int fromIndex) { in indexOfSupplementary() argument
1572 for (int i = fromIndex; i < max; i++) { in indexOfSupplementary()
1642 public int lastIndexOf(int ch, int fromIndex) { in lastIndexOf() argument
1646 int i = Math.min(fromIndex, length() - 1); in lastIndexOf()
[all …]
DStringBuilder.java385 public int indexOf(String str, int fromIndex) { in indexOf() argument
386 return super.indexOf(str, fromIndex); in indexOf()
395 public int lastIndexOf(String str, int fromIndex) { in lastIndexOf() argument
396 return super.lastIndexOf(str, fromIndex); in lastIndexOf()
DStringBuffer.java635 public synchronized int indexOf(String str, int fromIndex) { in indexOf() argument
636 return super.indexOf(str, fromIndex); in indexOf()
652 public synchronized int lastIndexOf(String str, int fromIndex) { in lastIndexOf() argument
653 return super.lastIndexOf(str, fromIndex); in lastIndexOf()
DAbstractStringBuilder.java1347 public int indexOf(String str, int fromIndex) { in indexOf() argument
1348 return String.indexOf(value, 0, count, str, fromIndex); in indexOf()
1386 public int lastIndexOf(String str, int fromIndex) { in lastIndexOf() argument
1387 return String.lastIndexOf(value, 0, count, str, fromIndex); in lastIndexOf()
/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 …ll public java.util.List<@libcore.util.NullFromTypeParam E> subList(int fromIndex, int toIndex) { … 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 …ll public java.util.List<@libcore.util.NullFromTypeParam E> subList(int fromIndex, int toIndex) { … in subList() argument
/libcore/ojluni/annotations/hiddenapi/java/lang/
DString.java217 public int indexOf(int ch, int fromIndex) { in indexOf() argument
221 private int indexOfSupplementary(int ch, int fromIndex) { in indexOfSupplementary() argument
229 public int lastIndexOf(int ch, int fromIndex) { in lastIndexOf() argument
233 private int lastIndexOfSupplementary(int ch, int fromIndex) { in lastIndexOfSupplementary() argument
241 public int indexOf(java.lang.String str, int fromIndex) { in indexOf() argument
245 private static int indexOf(java.lang.String source, java.lang.String target, int fromIndex) { in indexOf() argument
254 int fromIndex) { in indexOf() argument
266 int fromIndex) { in indexOf() argument
274 public int lastIndexOf(java.lang.String str, int fromIndex) { in lastIndexOf() argument
279 java.lang.String source, java.lang.String target, int fromIndex) { in lastIndexOf() argument
[all …]
DAbstractStringBuilder.java242 public int indexOf(java.lang.String str, int fromIndex) { in indexOf() argument
250 public int lastIndexOf(java.lang.String str, int fromIndex) { in lastIndexOf() argument
/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()
569 System.arraycopy(elements, 0, newElements, 0, fromIndex); in removeRange()
571 fromIndex, numMoved); 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
1194 offset = fromIndex; in COWSubList()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DObjectsTest.java54 private static void assertFromIndexSizeOutOfBounds(int fromIndex, int size, int length) { in assertFromIndexSizeOutOfBounds() argument
56 Objects.checkFromIndexSize(fromIndex, size, length); in assertFromIndexSizeOutOfBounds()
86 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/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/annotations/sdk/nullability/java/lang/
DString.annotated.java122 public int indexOf(int ch, int fromIndex) { throw new RuntimeException("Stub!"); } in indexOf() argument
126 public int lastIndexOf(int ch, int fromIndex) { throw new RuntimeException("Stub!"); } in lastIndexOf() argument
130 public int indexOf(@libcore.util.NonNull java.lang.String str, int fromIndex) { throw new RuntimeEx… in indexOf() argument
134 public int lastIndexOf(@libcore.util.NonNull java.lang.String str, int fromIndex) { throw new Runti… in lastIndexOf() argument
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
DInnerNodeImpl.java168 private void refreshIndices(int fromIndex) { in refreshIndices() argument
169 for (int i = fromIndex; i < children.size(); i++) { in refreshIndices()

12