Home
last modified time | relevance | path

Searched refs:copyOf (Results 1 – 25 of 113) sorted by relevance

12345

/libcore/ojluni/src/test/java/util/Map/
DMapFactories.java56 Map<Integer, String> copy = Map.copyOf(orig); in copyOfResultsEqual()
65 Map<Integer, String> copy = Map.copyOf(orig); in copyOfModifiedUnequal()
75 Map<Integer, String> copy1 = Map.copyOf(orig); in copyOfIdentity()
76 Map<Integer, String> copy2 = Map.copyOf(copy1); in copyOfIdentity()
84 Map<Integer, String> map = Map.copyOf(null); in copyOfRejectsNullMap()
91 Map<Integer, String> copy = Map.copyOf(map); in copyOfRejectsNullKey()
98 Map<Integer, String> copy = Map.copyOf(map); in copyOfRejectsNullValue()
/libcore/ojluni/src/main/java/java/text/
DDateFormatSymbols.java462 return Arrays.copyOf(eras, eras.length); in getEras()
470 eras = Arrays.copyOf(newEras, newEras.length); in setEras()
498 return Arrays.copyOf(months, months.length); in getMonths()
508 months = Arrays.copyOf(newMonths, newMonths.length); in setMonths()
536 return Arrays.copyOf(shortMonths, shortMonths.length); in getShortMonths()
546 shortMonths = Arrays.copyOf(newShortMonths, newShortMonths.length); in setShortMonths()
558 return Arrays.copyOf(weekdays, weekdays.length); in getWeekdays()
568 weekdays = Arrays.copyOf(newWeekdays, newWeekdays.length); in setWeekdays()
580 return Arrays.copyOf(shortWeekdays, shortWeekdays.length); in getShortWeekdays()
590 shortWeekdays = Arrays.copyOf(newShortWeekdays, newShortWeekdays.length); in setShortWeekdays()
[all …]
DChoiceFormat.java358 choiceLimits = Arrays.copyOf(limits, limits.length); in setChoices()
359 choiceFormats = Arrays.copyOf(formats, formats.length); in setChoices()
368 double[] newLimits = Arrays.copyOf(choiceLimits, choiceLimits.length); in getLimits()
378 Object[] newFormats = Arrays.copyOf(choiceFormats, choiceFormats.length); in getFormats()
/libcore/ojluni/src/main/java/java/lang/
DThreadGroup.java283 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in setMaxPriority()
363 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in activeCount()
458 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in enumerate()
496 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in activeGroupCount()
591 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in enumerate()
657 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in interrupt()
719 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in stopOrSuspend()
761 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in resume()
796 groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot); in destroy()
829 groups = Arrays.copyOf(groups, ngroups * 2); in add()
[all …]
/libcore/ojluni/src/main/java/java/io/
DCharArrayWriter.java82 buf = Arrays.copyOf(buf, Math.max(buf.length << 1, newcount)); in write()
110 buf = Arrays.copyOf(buf, Math.max(buf.length << 1, newcount)); in write()
132 buf = Arrays.copyOf(buf, Math.max(buf.length << 1, newcount)); in write()
255 return Arrays.copyOf(buf, count); in toCharArray()
DByteArrayOutputStream.java120 buf = Arrays.copyOf(buf, newCapacity); in grow()
211 return Arrays.copyOf(buf, count); in toByteArray()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKWeekFieldsSerialization.java111 byte[] val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
122 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
133 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
144 val = Arrays.copyOf(template, 110); in test_invalid_serialform()
DTCKValueRangeSerialization.java146 byte[] val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
157 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
168 val = Arrays.copyOf(template, template.length); in test_invalid_serialform()
/libcore/ojluni/src/main/java/java/sql/
DBatchUpdateException.java83 …this.updateCounts = (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.leng… in BatchUpdateException()
295 …this.updateCounts = (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.leng… in BatchUpdateException()
329 return (updateCounts == null) ? null : Arrays.copyOf(updateCounts, updateCounts.length); in getUpdateCounts()
/libcore/ojluni/src/test/java/util/Collection/
DSetFactories.java304 Set<Integer> copy = Set.copyOf(orig); in copyOfResultsEqual()
313 Set<Integer> copy = Set.copyOf(orig); in copyOfModifiedUnequal()
323 Set<Integer> copy1 = Set.copyOf(orig); in copyOfIdentity()
324 Set<Integer> copy2 = Set.copyOf(copy1); in copyOfIdentity()
332 Set<Integer> set = Set.copyOf(null); in copyOfRejectsNullCollection()
337 Set<Integer> set = Set.copyOf(Arrays.asList(1, null, 3)); in copyOfRejectsNullElements()
342 Set<Integer> set = Set.copyOf(Arrays.asList(1, 1, 2, 3, 3, 3)); in copyOfAcceptsDuplicates()
/libcore/ojluni/src/main/java/java/util/
DAbstractCollection.java145 return Arrays.copyOf(r, i); in toArray()
193 return Arrays.copyOf(r, i); in toArray()
227 r = Arrays.copyOf(r, len); in finishToArray()
232 return (i == len) ? r : Arrays.copyOf(r, i); in finishToArray()
DEnumSet.java153 public static <E extends Enum<E>> EnumSet<E> copyOf(EnumSet<E> s) { in copyOf() method in EnumSet
171 public static <E extends Enum<E>> EnumSet<E> copyOf(Collection<E> c) { in copyOf() method in EnumSet
197 EnumSet<E> result = copyOf(s); in complementOf()
DVector.java187 elementData = Arrays.copyOf(a, elementCount, Object[].class); in Vector()
220 elementData = Arrays.copyOf(elementData, elementCount); in trimToSize()
262 return elementData = Arrays.copyOf(elementData, newCapacity); in grow()
669 v.elementData = Arrays.copyOf(elementData, elementCount); in clone()
685 return Arrays.copyOf(elementData, elementCount); in toArray()
717 return (T[]) Arrays.copyOf(elementData, elementCount, a.getClass()); in toArray()
/libcore/ojluni/src/test/java/util/List/
DListFactories.java309 List<Integer> copy = List.copyOf(orig); in copyOfResultsEqual()
318 List<Integer> copy = List.copyOf(orig); in copyOfModifiedUnequal()
328 List<Integer> copy1 = List.copyOf(orig); in copyOfIdentity()
329 List<Integer> copy2 = List.copyOf(copy1); in copyOfIdentity()
339 List<Integer> copy = List.copyOf(sub); in copyOfSubList()
348 List<Integer> copy = List.copyOf(sub); in copyOfSubSubList()
355 List<Integer> list = List.copyOf(null); in copyOfRejectsNullCollection()
360 List<Integer> list = List.copyOf(Arrays.asList(1, null, 3)); in copyOfRejectsNullElements()
/libcore/luni/src/test/java/libcore/java/util/
DMapCopyOfTest.java33 assertThrows(NullPointerException.class, () -> Map.Entry.copyOf(null)); in shouldThrowNPE_whenArgumentIsNull()
43 var copy = Map.Entry.copyOf(entry); in createsCopy_whenNonNull()
/libcore/ojluni/src/main/java/sun/misc/
DIOUtils.java60 output = Arrays.copyOf(output, pos + bytesToRead); in readFully()
71 output = Arrays.copyOf(output, pos); in readFully()
DResource.java117 b = Arrays.copyOf(b, pos + bytesToRead); in getBytes()
134 b = Arrays.copyOf(b, pos); in getBytes()
/libcore/ojluni/src/test/java/util/Arrays/
DCopyMethods.java76 checkArray(Arrays.copyOf(a, 0), int.class, 0, 0, 3); in simpleTests()
77 checkArray(Arrays.copyOf(a, 1), int.class, 1, 0, 3); in simpleTests()
78 checkArray(Arrays.copyOf(a, 2), int.class, 2, 0, 3); in simpleTests()
79 checkArray(Arrays.copyOf(a, 3), int.class, 3, 0, 3); in simpleTests()
80 checkArray(Arrays.copyOf(a, 4), int.class, 4, 0, 3); in simpleTests()
102 byte[] bb = Arrays.copyOf(ba, j); in simpleTests()
126 String[] sa4 = Arrays.copyOf(sa, sa.length+1); in simpleTests()
311 System.out.println("test values: "+Arrays.toString(Arrays.copyOf(testValues, 5))+"..."); in main()
362 return Arrays.copyOf(a, len, Integer[].class); in copyOfIntegerArray()
DCorrect.java54 Integer[] array2 = Arrays.copyOf(array1, array1.length); in testDefaultSort()
67 Integer[] array2 = Arrays.copyOf(array1, array1.length); in testComparatorSort()
/libcore/ojluni/annotations/hiddenapi/java/util/
DArrays.java458 public static <T> T[] copyOf(T[] original, int newLength) { in copyOf() method in Arrays
462 public static <T, U> T[] copyOf( in copyOf() method in Arrays
467 public static byte[] copyOf(byte[] original, int newLength) { in copyOf() method in Arrays
471 public static short[] copyOf(short[] original, int newLength) { in copyOf() method in Arrays
475 public static int[] copyOf(int[] original, int newLength) { in copyOf() method in Arrays
479 public static long[] copyOf(long[] original, int newLength) { in copyOf() method in Arrays
483 public static char[] copyOf(char[] original, int newLength) { in copyOf() method in Arrays
487 public static float[] copyOf(float[] original, int newLength) { in copyOf() method in Arrays
491 public static double[] copyOf(double[] original, int newLength) { in copyOf() method in Arrays
495 public static boolean[] copyOf(boolean[] original, int newLength) { in copyOf() method in Arrays
/libcore/ojluni/src/test/java/util/zip/
DDeInflate.java64 !Arrays.equals(Arrays.copyOf(in, len), Arrays.copyOf(out2, len)) || in checkStream()
94 !Arrays.equals(Arrays.copyOf(expected, len), Arrays.copyOf(result, len)) || in checkByteBuffer()
229 if (n != src.length || !Arrays.equals(Arrays.copyOf(dstInf, n), src)) { in checkDict()
258 if (n != src.length || !Arrays.equals(Arrays.copyOf(dstInf, n), src)) { in checkDict()
DDeflaterDictionaryTests.java121 Assert.assertEquals(input, Arrays.copyOf(result, resultLength)); in testByteArray()
169 Assert.assertEquals(input, Arrays.copyOf(result, resultLength)); in testHeapByteBuffer()
223 Assert.assertEquals(input, Arrays.copyOf(result, resultLength)); in testByteBufferDirect()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DArraysTest.java3250 byte[] result = Arrays.copyOf(byteArray, arraySize * 2); in test_copyOf_$BI()
3258 result = Arrays.copyOf(byteArray, arraySize / 2); in test_copyOf_$BI()
3264 Arrays.copyOf((byte[]) null, arraySize); in test_copyOf_$BI()
3270 Arrays.copyOf(byteArray, -1); in test_copyOf_$BI()
3276 Arrays.copyOf((byte[]) null, -1); in test_copyOf_$BI()
3287 short[] result = Arrays.copyOf(shortArray, arraySize * 2); in test_copyOf_$SI()
3295 result = Arrays.copyOf(shortArray, arraySize / 2); in test_copyOf_$SI()
3301 Arrays.copyOf((short[]) null, arraySize); in test_copyOf_$SI()
3307 Arrays.copyOf(shortArray, -1); in test_copyOf_$SI()
3313 Arrays.copyOf((short[]) null, -1); in test_copyOf_$SI()
[all …]
/libcore/benchmarks/src/benchmarks/
DArrayCopyBenchmark.java43 char[] dst = Arrays.copyOf(src, 8192); in time_Arrays_copyOf()
/libcore/ojluni/src/test/java/io/InputStream/
DReadNBytes.java76 check(Arrays.equals((tmp = Arrays.copyOf(inputBytes, nread)), readBytes), in test()
86 Arrays.copyOf(readBytes, nread)), in test()

12345