Home
last modified time | relevance | path

Searched defs:array (Results 1 – 25 of 157) sorted by relevance

1234567

/libcore/luni/src/test/java/libcore/dalvik/system/
DVMRuntimeTest.java32 Object array = VMRuntime.getRuntime().newNonMovableArray(componentType, -1); in doTestNewNonMovableArray() local
38 … Object array = VMRuntime.getRuntime().newNonMovableArray(componentType, Integer.MIN_VALUE); in doTestNewNonMovableArray() local
45 Object array = VMRuntime.getRuntime().newNonMovableArray(componentType, i); in doTestNewNonMovableArray() local
55 Object array = VMRuntime.getRuntime().newNonMovableArray(null, 0); in testNewNonMovableArray() local
62 Object array = VMRuntime.getRuntime().newNonMovableArray(void.class, 0); in testNewNonMovableArray() local
86 Object array = VMRuntime.getRuntime().newUnpaddedArray(componentType, -1); in doTestNewUnpaddedArray() local
92 … Object array = VMRuntime.getRuntime().newUnpaddedArray(componentType, Integer.MIN_VALUE); in doTestNewUnpaddedArray() local
99 Object array = VMRuntime.getRuntime().newUnpaddedArray(componentType, i); in doTestNewUnpaddedArray() local
109 Object array = VMRuntime.getRuntime().newUnpaddedArray(null, 0); in testNewUnpaddedArray() local
116 Object array = VMRuntime.getRuntime().newUnpaddedArray(void.class, 0); in testNewUnpaddedArray() local
/libcore/ojluni/annotations/sdk/nullability/java/lang/reflect/
DArray.annotated.java40 …nt getLength(@libcore.util.NonNull java.lang.Object array) { throw new RuntimeException("Stub!"); } in getLength()
42 … int index) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { … in get()
44 …ang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeExceptio… in getBoolean()
46 …rayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stu… in getByte()
48 …rayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stu… in getChar()
50 …ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("S… in getShort()
52 …yIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stub!… in getInt()
54 …rayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("Stu… in getLong()
56 …ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException("S… in getFloat()
58 …g.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException { throw new RuntimeException(… in getDouble()
[all …]
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DNodeTest.java43 Integer[] array = new Integer[size]; in createSizes() local
66 Node<Integer> fill(Integer[] array, Node.Builder<Integer> nb) { in fill()
101 public void testAsArray(Integer[] array, Node<Integer> n) { in testAsArray()
102 assertEquals(n.asArray(LambdaTestHelpers.integerArrayGenerator), array); in testAsArray() local
106 public void testFlattenAsArray(Integer[] array, Node<Integer> n) { in testFlattenAsArray()
108 .asArray(LambdaTestHelpers.integerArrayGenerator), array); in testFlattenAsArray() local
112 public void testCopyTo(Integer[] array, Node<Integer> n) { in testCopyTo()
120 public void testForEach(Integer[] array, Node<Integer> n) { in testForEach()
124 assertEquals(l.toArray(), array); in testForEach() local
128 public void testStreams(Integer[] array, Node<Integer> n) { in testStreams()
[all …]
DLongNodeTest.java43 long[] array = new long[size]; in createSizes() local
65 private static void assertEqualsListLongArray(List<Long> list, long[] array) { in assertEqualsListLongArray()
90 private Node.OfLong fill(long[] array, Node.Builder.OfLong nb) { in fill()
124 public void testAsArray(long[] array, Node.OfLong n) { in testAsArray()
125 assertEquals(n.asPrimitiveArray(), array); in testAsArray() local
129 public void testFlattenAsArray(long[] array, Node.OfLong n) { in testFlattenAsArray()
130 assertEquals(Nodes.flattenLong(n).asPrimitiveArray(), array); in testFlattenAsArray() local
134 public void testCopyTo(long[] array, Node.OfLong n) { in testCopyTo()
142 public void testForEach(long[] array, Node.OfLong n) { in testForEach()
152 public void testStreams(long[] array, Node.OfLong n) { in testStreams()
[all …]
DIntNodeTest.java43 int[] array = new int[size]; in createSizes() local
65 private static void assertEqualsListIntArray(List<Integer> list, int[] array) { in assertEqualsListIntArray()
90 private Node.OfInt fill(int[] array, Node.Builder.OfInt nb) { in fill()
124 public void testAsArray(int[] array, Node.OfInt n) { in testAsArray()
125 assertEquals(n.asPrimitiveArray(), array); in testAsArray() local
129 public void testFlattenAsArray(int[] array, Node.OfInt n) { in testFlattenAsArray()
130 assertEquals(Nodes.flattenInt(n).asPrimitiveArray(), array); in testFlattenAsArray() local
134 public void testCopyTo(int[] array, Node.OfInt n) { in testCopyTo()
142 public void testForEach(int[] array, Node.OfInt n) { in testForEach()
152 public void testStreams(int[] array, Node.OfInt n) { in testStreams()
[all …]
DDoubleNodeTest.java43 double[] array = new double[size]; in createSizes() local
65 private static void assertEqualsListDoubleArray(List<Double> list, double[] array) { in assertEqualsListDoubleArray()
90 private Node.OfDouble fill(double[] array, Node.Builder.OfDouble nb) { in fill()
124 public void testAsArray(double[] array, Node.OfDouble n) { in testAsArray()
125 assertEquals(n.asPrimitiveArray(), array); in testAsArray() local
129 public void testFlattenAsArray(double[] array, Node.OfDouble n) { in testFlattenAsArray()
130 assertEquals(Nodes.flattenDouble(n).asPrimitiveArray(), array); in testFlattenAsArray() local
134 public void testCopyTo(double[] array, Node.OfDouble n) { in testCopyTo()
142 public void testForEach(double[] array, Node.OfDouble n) { in testForEach()
152 public void testStreams(double[] array, Node.OfDouble n) { in testStreams()
[all …]
DSpinedBufferTest.java65 int[] array = IntStream.range(0, size).toArray(); in createSpinedBuffer() local
88 public void testSpliterator(int[] array, SpinedBuffer<Integer> sb) { in testSpliterator()
96 public void testLastSplit(int[] array, SpinedBuffer<Integer> sb) { in testLastSplit()
138 Integer[] array = sb.asArray(LambdaTestHelpers.integerArrayGenerator); in testSpinedBuffer() local
152 int[] array = IntStream.range(0, size).toArray(); in createIntSpinedBuffer() local
163 public void testIntSpliterator(int[] array, SpinedBuffer.OfInt sb) { in testIntSpliterator()
171 public void testIntLastSplit(int[] array, SpinedBuffer.OfInt sb) { in testIntLastSplit()
213 int[] array = sb.asPrimitiveArray(); in testIntSpinedBuffer() local
227 long[] array = LongStream.range(0, size).toArray(); in createLongSpinedBuffer() local
238 public void testLongSpliterator(long[] array, SpinedBuffer.OfLong sb) { in testLongSpliterator()
[all …]
/libcore/ojluni/src/main/java/java/lang/reflect/
DArray.java137 public static int getLength(Object array) in getLength()
178 public static Object get(Object array, int index) in get()
230 public static boolean getBoolean(Object array, int index) in getBoolean()
255 public static byte getByte(Object array, int index) in getByte()
280 public static char getChar(Object array, int index) in getChar()
305 public static short getShort(Object array, int index) in getShort()
332 public static int getInt(Object array, int index) in getInt()
363 public static long getLong(Object array, int index) in getLong()
396 public static float getFloat(Object array, int index) in getFloat()
431 public static double getDouble(Object array, int index) in getDouble()
[all …]
/libcore/json/src/test/java/libcore/org/json/
DJSONArrayTest.java36 JSONArray array = new JSONArray(); in testEmptyArray() local
82 JSONArray array = new JSONArray(); in testBooleans() local
132 JSONArray array = new JSONArray(); in testCoerceStringToBoolean() local
144 JSONArray array = new JSONArray(); in testNulls() local
186 JSONArray array = new JSONArray("[\"null\",null]"); in testParseNullYieldsJSONObjectNull() local
205 JSONArray array = new JSONArray(); in testNumbers() local
251 JSONArray array = new JSONArray(); in testStrings() local
304 JSONArray array = new JSONArray(); in testJoin() local
320 JSONArray array = new JSONArray(Arrays.asList(5, 6)); in testJoinWithNull() local
325 JSONArray array = new JSONArray(Arrays.asList(5, 6)); in testJoinWithSpecialCharacters() local
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DDoublePrimitiveOpsTests.java47 double[] array = LongStream.range(1, 10).asDoubleStream().map(i -> i * 2).toArray(); in testToArray() local
52 … double[] array = LongStream.range(1, 10).parallel().asDoubleStream().map(i -> i * 2).toArray(); in testToArray() local
65 double[] array = Arrays.stream(content).sorted().toArray(); in testSort() local
70 double[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort() local
83 double[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort() local
88 double[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort() local
DIntPrimitiveOpsTests.java90 int[] array = IntStream.range(1, 10).map(i -> i * 2).toArray(); in testToArray() local
95 int[] array = IntStream.range(1, 10).parallel().map(i -> i * 2).toArray(); in testToArray() local
108 int[] array = Arrays.stream(content).sorted().toArray(); in testSort() local
113 int[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort() local
126 int[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort() local
131 int[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort() local
141 private final int[] array; in testSequential() field in IntPrimitiveOpsTests.AssertingConsumer
144 AssertingConsumer(int[] array) { in testSequential()
DLongPrimitiveOpsTests.java90 long[] array = LongStream.range(1, 10).map(i -> i * 2).toArray(); in testToArray() local
95 long[] array = LongStream.range(1, 10).parallel().map(i -> i * 2).toArray(); in testToArray() local
108 long[] array = Arrays.stream(content).sorted().toArray(); in testSort() local
113 long[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort() local
126 long[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort() local
131 long[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort() local
141 private final long[] array; in testSequential() field in LongPrimitiveOpsTests.AssertingConsumer
144 AssertingConsumer(long[] array) { in testSequential()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DPriorityQueueTest.java46 Integer[] array = { 2, 45, 7, -12, 9 }; in test_iterator() local
115 Integer[] array = { 2, 45, 7, -12, 9 }; in test_iterator_remove() local
143 String[] array = { "ONE", "TWO", "THREE", "FOUR", "FIVE" }; in test_iterator_removeEquals() local
158 Integer[] array = { 2, 45, 7, -12, 9 }; in test_iterator_remove_illegalState() local
187 int[] array = { 2, 45, 7, -12, 9 }; in test_size() local
260 Integer[] array = { 2, 45, 7, -12, 9 }; in test_ConstructorILjava_util_Comparator_cast() local
271 Integer[] array = { 2, 45, 7, -12, 9 }; in test_ConstructorLjava_util_Colleciton() local
317 String[] array = { "AAAAA", "AA", "AAAA", "AAAAAAAA" }; in test_ConstructorLjava_util_Colleciton_from_priorityqueue() local
336 int[] array = { 3, 5, 79, -17, 5 }; in test_ConstructorLjava_util_Colleciton_from_sortedset() local
357 int[] array = { 2, 45, 7, -12, 9 }; in test_ConstructorLjava_util_PriorityQueue() local
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DLongBufferTest.java51 long array[] = buf.array(); in testArray() local
68 long array[] = buf.array(); in testArrayOffset() local
257 long array[] = new long[1]; in testGetlongArray() local
285 long array[] = new long[buf.capacity()]; in testGetlongArrayintint() local
417 long array[] = new long[1]; in testPutlongArray() local
446 long array[] = new long[buf.capacity()]; in testPutlongArrayintint() local
609 void loadTestData1(long array[], int offset, int length) { in loadTestData1()
615 void loadTestData2(long array[], int offset, int length) { in loadTestData2()
635 void assertContentEquals(LongBuffer buf, long array[], in assertContentEquals()
638 assertEquals(buf.get(i), array[offset + i]); in assertContentEquals() local
DFloatBufferTest.java51 float array[] = buf.array(); in testArray() local
68 float array[] = buf.array(); in testArrayOffset() local
277 float array[] = new float[1]; in testGetfloatArray() local
306 float array[] = new float[buf.capacity()]; in testGetfloatArrayintint() local
440 float array[] = new float[1]; in testPutfloatArray() local
469 float array[] = new float[buf.capacity()]; in testPutfloatArrayintint() local
626 void loadTestData1(float array[], int offset, int length) { in loadTestData1()
632 void loadTestData2(float array[], int offset, int length) { in loadTestData2()
652 void assertContentEquals(FloatBuffer buf, float array[], in assertContentEquals()
655 assertEquals(buf.get(i), array[offset + i], 0.01); in assertContentEquals() local
DShortBufferTest.java50 short array[] = buf.array(); in testArray() local
67 short array[] = buf.array(); in testArrayOffset() local
256 short array[] = new short[1]; in testGetshortArray() local
277 short array[] = new short[buf.capacity()]; in testGetshortArrayintint() local
403 short array[] = new short[1]; in testPutshortArray() local
432 short array[] = new short[buf.capacity()]; in testPutshortArrayintint() local
589 void loadTestData1(short array[], int offset, int length) { in loadTestData1()
595 void loadTestData2(short array[], int offset, int length) { in loadTestData2()
615 void assertContentEquals(ShortBuffer buf, short array[], in assertContentEquals()
618 assertEquals(buf.get(i), array[offset + i]); in assertContentEquals() local
DIntBufferTest.java51 int array[] = buf.array(); in testArray() local
68 int array[] = buf.array(); in testArrayOffset() local
257 int array[] = new int[1]; in testGetintArray() local
284 int array[] = new int[buf.capacity()]; in testGetintArrayintint() local
416 int array[] = new int[1]; in testPutintArray() local
445 int array[] = new int[buf.capacity()]; in testPutintArrayintint() local
602 void loadTestData1(int array[], int offset, int length) { in loadTestData1()
608 void loadTestData2(int array[], int offset, int length) { in loadTestData2()
628 void assertContentEquals(IntBuffer buf, int array[], in assertContentEquals()
631 assertEquals(buf.get(i), array[offset + i]); in assertContentEquals() local
DDoubleBufferTest.java75 double array[] = buf.array(); in testArray() local
92 double array[] = buf.array(); in testArrayOffset() local
627 void loadTestData1(double array[], int offset, int length) { in loadTestData1()
633 void loadTestData2(double array[], int offset, int length) { in loadTestData2()
653 private void assertContentEquals(DoubleBuffer buf, double array[], in assertContentEquals()
656 assertEquals(buf.get(i), array[offset + i], 0.01); in assertContentEquals() local
DCharBufferTest.java54 char array[] = buf.array(); in testArray() local
71 char array[] = buf.array(); in testArrayOffset() local
319 char array[] = new char[1]; in testGetcharArray() local
340 char array[] = new char[buf.capacity()]; in testGetcharArrayintint() local
459 char array[] = new char[1]; in testPutcharArray() local
488 char array[] = new char[buf.capacity()]; in testPutcharArrayintint() local
798 char array[] = new char[buf.capacity()]; in testPutStringintint() local
808 void loadTestData1(char array[], int offset, int length) { in loadTestData1()
814 void loadTestData2(char array[], int offset, int length) { in loadTestData2()
834 private void assertContentEquals(CharBuffer buf, char array[], int offset, in assertContentEquals()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DPriorityBlockingQueue.java288 private void tryGrow(Object[] array, int oldCap) { in tryGrow()
326 Object[] array = queue; in dequeue() local
355 private static <T> void siftUpComparable(int k, T x, Object[] array) { in siftUpComparable()
368 private static <T> void siftUpUsingComparator(int k, T x, Object[] array, in siftUpUsingComparator()
391 private static <T> void siftDownComparable(int k, T x, Object[] array, in siftDownComparable()
412 private static <T> void siftDownUsingComparator(int k, T x, Object[] array, in siftDownUsingComparator()
437 Object[] array = queue; in heapify() local
482 Object[] array; in offer() local
613 Object[] array = queue; in indexOf() local
626 Object[] array = queue; in removeAt() local
[all …]
/libcore/ojluni/src/main/java/java/util/stream/
DNodes.java139 static <T> Node<T> node(T[] array) { in node()
192 static Node.OfInt node(int[] array) { in node()
229 static Node.OfLong node(final long[] array) { in node()
266 static Node.OfDouble node(final double[] array) { in node()
324 P_OUT[] array = generator.apply((int) size); in collect() local
361 int[] array = new int[(int) size]; in collectInt() local
399 long[] array = new long[(int) size]; in collectLong() local
437 double[] array = new double[(int) size]; in collectDouble() local
469 T[] array = generator.apply((int) size); in flatten() local
495 int[] array = new int[(int) size]; in flattenInt() local
[all …]
DSpinedBuffer.java191 public void copyInto(E[] array, int offset) { in copyInto()
481 protected abstract int arrayLength(T_ARR array); in arrayLength()
484 protected abstract void arrayForEach(T_ARR array, int from, int to, in arrayForEach()
541 public void copyInto(T_ARR array, int offset) { in copyInto()
635 abstract void arrayForOne(T_ARR array, int index, T_CONS consumer); in arrayForOne()
637 abstract T_SPLITR arraySpliterator(T_ARR array, int offset, int len); in arraySpliterator()
762 protected int arrayLength(int[] array) { in arrayLength()
767 protected void arrayForEach(int[] array, in arrayForEach()
812 void arrayForOne(int[] array, int index, IntConsumer consumer) { in spliterator()
817 Spliterator.OfInt arraySpliterator(int[] array, int offset, int len) { in spliterator()
[all …]
/libcore/benchmarks/src/benchmarks/
DDeepArrayOpsBenchmark.java29 private Object[] array; field in DeepArrayOpsBenchmark
95 Object[] array = new Object[16]; in new16ElementObjectarray() local
106 T[] array = (T []) Array.newInstance(type, 16); in new16ElementArray() local
/libcore/ojluni/annotations/hiddenapi/java/util/concurrent/
DPriorityBlockingQueue.java60 private void tryGrow(java.lang.Object[] array, int oldCap) { in tryGrow()
69 private static <T> void siftUpComparable(int k, T x, java.lang.Object[] array) { in siftUpComparable()
74 int k, T x, java.lang.Object[] array, java.util.Comparator<? super T> cmp) { in siftUpUsingComparator()
78 private static <T> void siftDownComparable(int k, T x, java.lang.Object[] array, int n) { in siftDownComparable()
83 int k, T x, java.lang.Object[] array, int n, java.util.Comparator<? super T> cmp) { in siftDownUsingComparator()
242 Itr(java.lang.Object[] array) { in Itr()
258 final java.lang.Object[] array; field in PriorityBlockingQueue.Itr
274 java.lang.Object[] array, in PBQSpliterator()
304 java.lang.Object[] array; field in PriorityBlockingQueue.PBQSpliterator
/libcore/luni/src/test/java/libcore/java/util/
DTimSortTest.java47 Integer[] array = createBugTriggerData(); in testBug19493779WithComparable() local
54 Integer[] array = createBugTriggerData(); in testBug19493779WithComparator() local

1234567