Home
last modified time | relevance | path

Searched refs:toArray (Results 1 – 25 of 215) sorted by relevance

123456789

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DIntSliceOpTest.java74 … exerciseOps(IntStream.range(1, 2).toArray(), s -> s.skip(0), IntStream.range(1, 2).toArray()); in testSkip()
75 exerciseOps(IntStream.range(1, 2).toArray(), s -> s.skip(1), EMPTY_INT_ARRAY); in testSkip()
76 … exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(0), IntStream.range(1, 101).toArray()); in testSkip()
77 …exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(10), IntStream.range(11, 101).toArray()… in testSkip()
78 exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(100), EMPTY_INT_ARRAY); in testSkip()
79 exerciseOps(IntStream.range(1, 101).toArray(), s -> s.skip(200), EMPTY_INT_ARRAY); in testSkip()
96 exerciseOps(IntStream.range(1, 2).toArray(), s -> s.limit(0), EMPTY_INT_ARRAY); in testLimit()
97 … exerciseOps(IntStream.range(1, 2).toArray(), s -> s.limit(1), IntStream.range(1, 2).toArray()); in testLimit()
98 exerciseOps(IntStream.range(1, 101).toArray(), s -> s.limit(0), EMPTY_INT_ARRAY); in testLimit()
99 …exerciseOps(IntStream.range(1, 101).toArray(), s -> s.limit(10), IntStream.range(1, 11).toArray()); in testLimit()
[all …]
DDoublePrimitiveOpsTests.java47 double[] array = LongStream.range(1, 10).asDoubleStream().map(i -> i * 2).toArray(); in testToArray()
52 … double[] array = LongStream.range(1, 10).parallel().asDoubleStream().map(i -> i * 2).toArray(); in testToArray()
60 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSort()
65 double[] array = Arrays.stream(content).sorted().toArray(); in testSort()
70 double[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort()
78 double[] content = DoubleStream.generate(() -> r.nextDouble()).limit(10).toArray(); in testSortSort()
83 double[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort()
88 double[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort()
97 double[] actual = DoubleStream.iterate(1.0, i -> i + 1.0).limit(9).toArray(); in testLimit()
102 … double[] actual = LongStream.range(1, 100).parallel().asDoubleStream().limit(9).toArray(); in testLimit()
DToArrayOpTest.java55 assertCountSum(Arrays.asList(countTo(0).stream().toArray()), 0, 0); in testToArray()
56 assertCountSum(Arrays.asList(countTo(10).stream().toArray()), 10, 55); in testToArray()
61 exerciseTerminalOps(data, s -> s.toArray()); in testOps()
69 …Object[] objects = exerciseTerminalOps(data, s -> s.map(i -> (Integer) (i + i)), s -> s.toArray()); in testOpsWithMap()
78 Object[] objects = exerciseTerminalOps(data, s -> s.sorted(), s -> s.toArray()); in testOpsWithSorted()
89 s -> s.toArray()); in testOpsWithFlatMap()
98 exerciseTerminalOps(data, s -> s.filter(LambdaTestHelpers.pEven), s -> s.toArray()); in testOpsWithFilter()
108 s -> s.toArray(Integer[]::new)); in testAsArrayWithType()
122 exerciseTerminalOps(data, f, s -> s.toArray()); in testDistinctAndSortedPermutations()
124 Integer[] is = exerciseTerminalOps(data, f, s -> s.toArray(Integer[]::new)); in testDistinctAndSortedPermutations()
[all …]
DIntPrimitiveOpsTests.java90 int[] array = IntStream.range(1, 10).map(i -> i * 2).toArray(); in testToArray()
95 int[] array = IntStream.range(1, 10).parallel().map(i -> i * 2).toArray(); in testToArray()
103 int[] content = IntStream.generate(() -> r.nextInt(100)).limit(10).toArray(); in testSort()
108 int[] array = Arrays.stream(content).sorted().toArray(); in testSort()
113 int[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort()
121 int[] content = IntStream.generate(() -> r.nextInt(100)).limit(10).toArray(); in testSortSort()
126 int[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort()
131 int[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort()
138 int[] expected = IntStream.range(1, 1000).toArray(); in testSequential()
170 int[] expected = IntStream.range(1, 10).toArray(); in testLimit()
[all …]
DLongPrimitiveOpsTests.java90 long[] array = LongStream.range(1, 10).map(i -> i * 2).toArray(); in testToArray()
95 long[] array = LongStream.range(1, 10).parallel().map(i -> i * 2).toArray(); in testToArray()
103 long[] content = LongStream.generate(() -> r.nextLong()).limit(10).toArray(); in testSort()
108 long[] array = Arrays.stream(content).sorted().toArray(); in testSort()
113 long[] array = Arrays.stream(content).parallel().sorted().toArray(); in testSort()
121 long[] content = LongStream.generate(() -> r.nextLong()).limit(10).toArray(); in testSortSort()
126 long[] array = Arrays.stream(content).sorted().sorted().toArray(); in testSortSort()
131 long[] array = Arrays.stream(content).parallel().sorted().sorted().toArray(); in testSortSort()
138 long[] expected = LongStream.range(1, 1000).toArray(); in testSequential()
170 long[] expected = LongStream.range(1, 10).toArray(); in testLimit()
[all …]
DStreamBuilderTest.java54 return sizes.stream().map(i -> new Object[] { i }).toArray(Object[][]::new); in createStreamBuilders()
188 expectedResult(IntStream.range(0, size).toArray()). in testIntStreamBuilder()
193 expectedResult(IntStream.range(0, size).toArray()). in testIntStreamBuilder()
250 expectedResult(LongStream.range(0, size).toArray()). in testLongStreamBuilder()
255 expectedResult(LongStream.range(0, size).toArray()). in testLongStreamBuilder()
311 expectedResult(IntStream.range(0, size).asDoubleStream().toArray()). in testDoubleStreamBuilder()
316 expectedResult(IntStream.range(0, size).asDoubleStream().toArray()). in testDoubleStreamBuilder()
DRangeTest.java71 int[] inc = IntStream.range(start, end).toArray(); in testIntRange()
91 int[] inc = IntStream.rangeClosed(start, end).toArray(); in testIntRange()
102 int[] inc = IntStream.rangeClosed(Integer.MAX_VALUE - 1, Integer.MAX_VALUE).toArray(); in testIntRange()
107 inc = IntStream.rangeClosed(Integer.MAX_VALUE, Integer.MAX_VALUE).toArray(); in testIntRange()
161 long[] inc = LongStream.range(start, end).toArray(); in testLongRange()
181 long[] inc = LongStream.rangeClosed(start, end).toArray(); in testLongRange()
192 long[] inc = LongStream.rangeClosed(Long.MAX_VALUE - 1, Long.MAX_VALUE).toArray(); in testLongRange()
197 inc = LongStream.rangeClosed(Long.MAX_VALUE, Long.MAX_VALUE).toArray(); in testLongRange()
/libcore/luni/src/test/java/libcore/java/lang/
DStringBufferTest.java31 assertTrue(Arrays.equals(expected, s.chars().toArray())); in testChars()
36 assertTrue(Arrays.equals(new int[]{high, low, low}, surrogateCP.chars().toArray())); in testChars()
45 assertTrue(Arrays.equals(expected, s.codePoints().toArray())); in testCodePoints()
50 assertEquals(Character.toCodePoint(high, low), surrogateCP.codePoints().toArray()[0]); in testCodePoints()
51 assertEquals((int) low, surrogateCP.codePoints().toArray()[1]); // Unmatched surrogate. in testCodePoints()
52 assertEquals((int) '0', surrogateCP.codePoints().toArray()[2]); in testCodePoints()
DStringBuilderTest.java141 assertTrue(Arrays.equals(expected, s.chars().toArray())); in testChars()
146 assertTrue(Arrays.equals(new int[]{high, low, low}, surrogateCP.chars().toArray())); in testChars()
155 assertTrue(Arrays.equals(expected, s.codePoints().toArray())); in testCodePoints()
160 assertEquals(Character.toCodePoint(high, low), surrogateCP.codePoints().toArray()[0]); in testCodePoints()
161 assertEquals((int) low, surrogateCP.codePoints().toArray()[1]); // Unmatched surrogate. in testCodePoints()
162 assertEquals((int) '0', surrogateCP.codePoints().toArray()[2]); in testCodePoints()
/libcore/luni/src/test/java/libcore/java/nio/
DCharBufferTest.java36 assertTrue(Arrays.equals(expected, cb.chars().limit(s.length()).toArray())); in testChars()
46 assertTrue(Arrays.equals(expected, cb.codePoints().limit(s.length()).toArray())); in testCodePoints()
53 assertEquals(Character.toCodePoint(high, low), cb.codePoints().toArray()[0]); in testCodePoints()
54 assertEquals((int) low, cb.codePoints().toArray()[1]); // Unmatched surrogate. in testCodePoints()
55 assertEquals((int) '0', cb.codePoints().toArray()[2]); in testCodePoints()
/libcore/luni/src/test/java/libcore/java/util/
DRandomTest.java54 int[] streamRands = new Random(0).ints().limit(limit).toArray(); in test_ints$()
67 int[] streamRands = new Random(0).ints(size).toArray(); in test_ints$L()
87 int[] streamRands = new Random(0).ints(origin, bound).limit(limit).toArray(); in test_ints$II()
106 int[] streamRands = new Random(0).ints(size, origin, bound).toArray(); in test_ints$LII()
129 long[] streamRands = new Random(0).longs().limit(limit).toArray(); in test_longs$()
142 long[] streamRands = new Random(0).longs(size).toArray(); in test_longs$L()
162 long[] streamRands = new Random(0).longs(origin, bound).limit(limit).toArray(); in test_longs$II()
181 long[] streamRands = new Random(0).longs(size, origin, bound).toArray(); in test_longs$LII()
204 double[] streamRands = new Random(0).doubles().limit(limit).toArray(); in test_doubles$()
217 double[] streamRands = new Random(0).doubles(size).toArray(); in test_doubles$L()
[all …]
DAbstractCollectionTest.java34 m.values().toArray(); in test_toArray()
35 m.values().toArray(new Integer[m.size()]); in test_toArray()
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DSliceSpliteratorTest.java77 … Spliterator<Integer> s = Arrays.spliterator(source.stream().toArray(Integer[]::new)); in sliceSpliteratorDataProvider()
90 … Spliterator.OfInt s = Arrays.spliterator(source.stream().mapToInt(i->i).toArray()); in sliceSpliteratorDataProvider()
103 … Spliterator.OfLong s = Arrays.spliterator(source.stream().mapToLong(i->i).toArray()); in sliceSpliteratorDataProvider()
116 … Spliterator.OfDouble s = Arrays.spliterator(source.stream().mapToDouble(i->i).toArray()); in sliceSpliteratorDataProvider()
133 … Spliterator<Integer> s = Arrays.spliterator(source.stream().toArray(Integer[]::new)); in sliceSpliteratorDataProvider()
147 … Spliterator.OfInt s = Arrays.spliterator(source.stream().mapToInt(i->i).toArray()); in sliceSpliteratorDataProvider()
161 … Spliterator.OfLong s = Arrays.spliterator(source.stream().mapToLong(i->i).toArray()); in sliceSpliteratorDataProvider()
175 … Spliterator.OfDouble s = Arrays.spliterator(LongStream.range(0, SIZE).asDoubleStream().toArray()); in sliceSpliteratorDataProvider()
183 return data.toArray(new Object[0][]); in sliceSpliteratorDataProvider()
DFlagOpTest.java110 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsClearAllSet()
112 FlagDeclaringOp[] opsArray = ops.toArray(new FlagDeclaringOp[ops.size()]); in testFlagsClearAllSet()
149 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsSetAllClear()
151 FlagDeclaringOp[] opsArray = ops.toArray(new FlagDeclaringOp[ops.size()]); in testFlagsSetAllClear()
183 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsSetSequence()
185 IntermediateTestOp[] opsArray = ops.toArray(new IntermediateTestOp[ops.size()]); in testFlagsSetSequence()
219 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsClearSequence()
221 IntermediateTestOp[] opsArray = ops.toArray(new IntermediateTestOp[ops.size()]); in testFlagsClearSequence()
245 …er, Stream<Integer>> data = TestData.Factory.ofArray("Array", countTo(10).toArray(new Integer[0])); in testFlagsSizedOrderedParallelCollect()
247 IntermediateTestOp[] opsArray = ops.toArray(new IntermediateTestOp[ops.size()]); in testFlagsSizedOrderedParallelCollect()
DSpinedBufferTest.java65 int[] array = IntStream.range(0, size).toArray(); in createSpinedBuffer()
84 return params.toArray(new Object[0][]); in createSpinedBuffer()
152 int[] array = IntStream.range(0, size).toArray(); in createIntSpinedBuffer()
159 return params.toArray(new Object[0][]); in createIntSpinedBuffer()
227 long[] array = LongStream.range(0, size).toArray(); in createLongSpinedBuffer()
234 return params.toArray(new Object[0][]); in createLongSpinedBuffer()
303 double[] array = LongStream.range(0, size).asDoubleStream().toArray(); in createDoubleSpinedBuffer()
310 return params.toArray(new Object[0][]); in createDoubleSpinedBuffer()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DAbstractCollectionTest.java247 Object[] array = ac.toArray(); in test_toArray()
288 ac.toArray(null); in test_toArray$Ljava_lang_Object()
295 ac.toArray(new StringBuffer[ac.size()]); in test_toArray$Ljava_lang_Object()
302 assertSame(a, ac.toArray(a)); in test_toArray$Ljava_lang_Object()
305 assertNotSame(a, ac.toArray(a)); in test_toArray$Ljava_lang_Object()
306 a = ac.toArray(a); in test_toArray$Ljava_lang_Object()
310 ac.toArray(csa); in test_toArray$Ljava_lang_Object()
/libcore/support/src/test/java/tests/support/
DSupport_MapTest.java135 T[] set1TypedArray1 = set1.toArray(zeroLengthArray); in crossCheckOrdering()
159 T[] set1TypedArray2 = set1.toArray(parameterArray1); in crossCheckOrdering()
164 Object[] set1UntypedArray = set1.toArray(); in crossCheckOrdering()
169 T[] set2TypedArray1 = set2.toArray(zeroLengthArray); in crossCheckOrdering()
175 T[] set2TypedArray2 = set1.toArray(parameterArray2); in crossCheckOrdering()
180 Object[] set2UntypedArray = set2.toArray(); in crossCheckOrdering()
/libcore/jsr166-tests/src/test/java/jsr166/
DCopyOnWriteArraySetTest.java312 Object[] a = new CopyOnWriteArraySet().toArray(); in testToArray()
322 assertTrue(Arrays.equals(elements, full.toArray())); in testToArray()
323 assertSame(Object[].class, full.toArray().getClass()); in testToArray()
335 assertSame(a, empty.toArray(a)); in testToArray2()
339 assertSame(a, empty.toArray(a)); in testToArray2()
351 assertTrue(Arrays.equals(elements, full.toArray(a))); in testToArray2()
354 assertSame(Integer[].class, full.toArray(a).getClass()); in testToArray2()
358 assertSame(a, full.toArray(a)); in testToArray2()
363 assertSame(a, full.toArray(a)); in testToArray2()
379 c.toArray(new Long[5]); in testToArray_ArrayStoreException()
[all …]
DCopyOnWriteArrayListTest.java432 Object[] a = new CopyOnWriteArrayList().toArray(); in testToArray()
442 assertTrue(Arrays.equals(elements, full.toArray())); in testToArray()
443 assertSame(Object[].class, full.toArray().getClass()); in testToArray()
455 assertSame(a, empty.toArray(a)); in testToArray2()
459 assertSame(a, empty.toArray(a)); in testToArray2()
471 assertTrue(Arrays.equals(elements, full.toArray(a))); in testToArray2()
474 assertSame(Integer[].class, full.toArray(a).getClass()); in testToArray2()
478 assertSame(a, full.toArray(a)); in testToArray2()
483 assertSame(a, full.toArray(a)); in testToArray2()
524 c.toArray(new Long[5]); in testToArray_ArrayStoreException()
[all …]
/libcore/ojluni/src/main/java/java/util/
DSet.java146 Object[] toArray(); in toArray() method
190 <T> T[] toArray(T[] a); in toArray() method
DCollection.java194 Object[] toArray(); in toArray() method
238 <T> T[] toArray(T[] a); in toArray() method
DList.java170 Object[] toArray(); in toArray() method
210 <T> T[] toArray(T[] a); in toArray() method
/libcore/luni/src/main/java/java/util/concurrent/
DCopyOnWriteArraySet.java148 public Object[] toArray() { in toArray() method in CopyOnWriteArraySet
149 return al.toArray(); in toArray()
193 public <T> T[] toArray(T[] a) { in toArray() method in CopyOnWriteArraySet
194 return al.toArray(a); in toArray()
DDelayQueue.java399 public Object[] toArray() { in toArray() method in DelayQueue
403 return q.toArray(); in toArray()
444 public <T> T[] toArray(T[] a) { in toArray() method in DelayQueue
448 return q.toArray(a); in toArray()
497 return new Itr(toArray()); in iterator()
/libcore/ojluni/src/main/java/java/security/
DSecurity.java350 return Providers.getFullProviderList().toArray(); in getProviders()
544 Object[] candidatesArray = candidates.toArray(); in getProviders()
588 (type, getSpiClass(type), algorithm).toArray(); in getImpl()
591 (type, getSpiClass(type), algorithm, provider).toArray(); in getImpl()
600 (type, getSpiClass(type), algorithm, params).toArray(); in getImpl()
603 (type, getSpiClass(type), algorithm, params, provider).toArray(); in getImpl()
617 (type, getSpiClass(type), algorithm, provider).toArray(); in getImpl()
624 (type, getSpiClass(type), algorithm, params, provider).toArray(); in getImpl()

123456789