/libcore/ojluni/src/main/java/java/lang/reflect/ |
H A D | Array.java | 48 * Creates a new array with the specified component type and 50 * Invoking this method is equivalent to creating an array 60 * component type of the new array 61 * @param length the length of the new array 62 * @return the new array 75 * Creates a new array 78 * represents a non-array class or interface, the new array 81 * {@code componentType} represents an array class, the 82 * number of dimensions of the new array i 129 getLength(Object array) argument 168 get(Object array, int index) argument 218 getBoolean(Object array, int index) argument 241 getByte(Object array, int index) argument 264 getChar(Object array, int index) argument 287 getShort(Object array, int index) argument 312 getInt(Object array, int index) argument 341 getLong(Object array, int index) argument 372 getFloat(Object array, int index) argument 405 getDouble(Object array, int index) argument 441 set(Object array, int index, Object value) argument 493 setBoolean(Object array, int index, boolean value) argument 519 setByte(Object array, int index, byte value) argument 555 setChar(Object array, int index, char value) argument 589 setShort(Object array, int index, short value) argument 623 setInt(Object array, int index, int value) argument 655 setLong(Object array, int index, long value) argument 685 setFloat(Object array, int index, float value) argument 713 setDouble(Object array, int index, double value) argument 773 badArray(Object array) argument [all...] |
/libcore/ojluni/src/main/java/java/nio/ |
H A D | Buffer.java | 373 * buf.get(array); // Copy data into array</pre></blockquote> 413 * array. 415 * <p> If this method returns <tt>true</tt> then the {@link #array() array} 420 * is backed by an array and is not read-only 426 * Returns the array that backs this 429 * <p> This method is intended to allow array-backed buffers to be 434 * array's content to be modified, and vice versa. 438 * array 445 public abstract Object array(); method in class:Buffer [all...] |
H A D | DoubleBuffer.java | 45 * into an array; and</p></li> 49 * double array or some other double 60 * double array into a buffer, or by creating a 93 // backing array, and array offset 114 * initialized to zero. It will have a {@link #array 115 * </code>backing array<code>}, and its {@link #arrayOffset </code>array 129 * Wraps a double array into a buffer. 131 * <p> The new buffer will be backed by the given double array; 152 wrap(double[] array, int offset, int length) argument 175 wrap(double[] array) argument 508 public final double[] array() { method in class:DoubleBuffer [all...] |
H A D | FloatBuffer.java | 45 * into an array; and</p></li> 49 * float array or some other float 61 * float array into a buffer, or by creating a 94 // backing array, and array offset 115 * initialized to zero. It will have a {@link #array 116 * </code>backing array<code>}, and its {@link #arrayOffset </code>array 130 * Wraps a float array into a buffer. 132 * <p> The new buffer will be backed by the given float array; 153 wrap(float[] array, int offset, int length) argument 176 wrap(float[] array) argument 509 public final float[] array() { method in class:FloatBuffer [all...] |
H A D | IntBuffer.java | 46 * into an array; and</p></li> 50 * int array or some other int 63 * int array into a buffer, or by creating a 96 // backing array, and array offset 117 * initialized to zero. It will have a {@link #array 118 * </code>backing array<code>}, and its {@link #arrayOffset </code>array 132 * Wraps an int array into a buffer. 134 * <p> The new buffer will be backed by the given int array; 155 wrap(int[] array, int offset, int length) argument 178 wrap(int[] array) argument 511 public final int[] array() { method in class:IntBuffer [all...] |
H A D | LongBuffer.java | 45 * into an array; and</p></li> 49 * long array or some other long 61 * long array into a buffer, or by creating a 94 // backing array, and array offset 115 * initialized to zero. It will have a {@link #array 116 * </code>backing array<code>}, and its {@link #arrayOffset </code>array 130 * Wraps a long array into a buffer. 132 * <p> The new buffer will be backed by the given long array; 153 wrap(long[] array, int offset, int length) argument 176 wrap(long[] array) argument 509 public final long[] array() { method in class:LongBuffer [all...] |
H A D | ShortBuffer.java | 45 * into an array; and</p></li> 49 * short array or some other short 62 * short array into a buffer, or by creating a 95 // backing array, and array offset 116 * initialized to zero. It will have a {@link #array 117 * </code>backing array<code>}, and its {@link #arrayOffset </code>array 131 * Wraps a short array into a buffer. 133 * <p> The new buffer will be backed by the given short array; 154 wrap(short[] array, int offset, int length) argument 177 wrap(short[] array) argument 510 public final short[] array() { method in class:ShortBuffer [all...] |
H A D | CharBuffer.java | 52 * into an array; and</p></li> 56 * char array, a string, or some other char 68 * char array or string into a buffer, or by creating a 120 // backing array, and array offset 141 * initialized to zero. It will have a {@link #array 142 * </code>backing array<code>}, and its {@link #arrayOffset </code>array 156 * Wraps a char array into a buffer. 158 * <p> The new buffer will be backed by the given char array; 179 wrap(char[] array, int offset, int length) argument 202 wrap(char[] array) argument 711 public final char[] array() { method in class:CharBuffer [all...] |
/libcore/ojluni/src/main/java/java/text/ |
H A D | ChoiceFormat.java | 57 * on whether the number (X) is too low or too high. If the limit array is not 71 * When creating a <code>ChoiceFormat</code>, you must specify an array of formats 72 * and an array of limits. The length of these arrays must be the same. 328 * If the limit array is not in ascending order, the results of formatting 605 private static double[] doubleArraySize(double[] array) { argument 606 int oldSize = array.length; 608 System.arraycopy(array, 0, newArray, 0, oldSize); 612 private String[] doubleArraySize(String[] array) { argument 613 int oldSize = array.length; 615 System.arraycopy(array, [all...] |
/libcore/ojluni/src/main/java/java/util/stream/ |
H A D | Node.java | 50 * structures such as a {@code Collection}, array, or a set of other 117 * @param generator A function to be used to create a new array, if needed, 135 * Provides an array view of the contents of this node. 138 * reference to an internal array rather than a copy. Since the returned 139 * array may be shared, the returned array should not be modified. The 140 * {@code generator} function may be consulted to create the array if a new 141 * array needs to be created. 144 * returns a new, empty array of that size and of the appropriate 145 * array typ 164 copyInto(T[] array, int offset) argument 308 copyInto(T_ARR array, int offset) argument [all...] |
H A D | SortedOps.java | 287 * Sorting sinks first accept all elements, buffering then into an array 331 private T[] array; field in class:SortedOps.SizedRefSortingSink 343 array = (T[]) new Object[(int) size]; 348 Arrays.sort(array, 0, offset, comparator); 352 downstream.accept(array[i]); 356 downstream.accept(array[i]); 359 array = null; 364 array[offset++] = t; 429 private int[] array; field in class:SortedOps.SizedIntSortingSink 440 array 527 private long[] array; field in class:SortedOps.SizedLongSortingSink 625 private double[] array; field in class:SortedOps.SizedDoubleSortingSink [all...] |
H A D | SpinedBuffer.java | 48 * arrays has better performance characteristics than a single array used by 73 * array, curChunk becomes the first element in it. When we clear the 165 // Casts to int are safe since the spine array index is the index minus 186 * array. 188 public void copyInto(E[] array, int offset) { argument 190 if (finalOffset > array.length || finalOffset < offset) { 195 System.arraycopy(curChunk, 0, array, offset, elementIndex); 199 System.arraycopy(spine[i], 0, array, offset, spine[i].length); 203 System.arraycopy(curChunk, 0, array, offset, elementIndex); 208 * Create a new array usin 479 arrayLength(T_ARR array) argument 482 arrayForEach(T_ARR array, int from, int to, T_CONS consumer) argument 539 copyInto(T_ARR array, int offset) argument 633 arrayForOne(T_ARR array, int index, T_CONS consumer) argument 635 arraySpliterator(T_ARR array, int offset, int len) argument 757 arrayLength(int[] array) argument 762 arrayForEach(int[] array, int from, int to, IntConsumer consumer) argument 871 arrayLength(long[] array) argument 876 arrayForEach(long[] array, int from, int to, LongConsumer consumer) argument 987 arrayLength(double[] array) argument 992 arrayForEach(double[] array, int from, int to, DoubleConsumer consumer) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | ThreadGroupTest.java | 706 // Now we may have nulls in the array, we must find the actual size 753 private static boolean arrayIncludes(Object[] array, Object toTest) { argument 754 for (Object element : array) {
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/ |
H A D | CharBufferTest.java | 54 char array[] = buf.array(); 55 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 57 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 58 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 60 loadTestData2(array, buf.arrayOffset(), buf.capacity()); 61 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 64 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 67 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 71 char array[] 808 loadTestData1(char array[], int offset, int length) argument 814 loadTestData2(char array[], int offset, int length) argument 834 assertContentEquals(CharBuffer buf, char array[], int offset, int length) argument [all...] |
H A D | DoubleBufferTest.java | 75 double array[] = buf.array(); 76 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 78 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 79 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 81 loadTestData2(array, buf.arrayOffset(), buf.capacity()); 82 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 85 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 88 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 92 double array[] 616 loadTestData1(double array[], int offset, int length) argument 622 loadTestData2(double array[], int offset, int length) argument 642 assertContentEquals(DoubleBuffer buf, double array[], int offset, int length) argument [all...] |
H A D | FloatBufferTest.java | 51 float array[] = buf.array(); 52 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 54 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 55 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 57 loadTestData2(array, buf.arrayOffset(), buf.capacity()); 58 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 61 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 64 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 68 float array[] 626 loadTestData1(float array[], int offset, int length) argument 632 loadTestData2(float array[], int offset, int length) argument 652 assertContentEquals(FloatBuffer buf, float array[], int offset, int length) argument [all...] |
H A D | IntBufferTest.java | 51 int array[] = buf.array(); 52 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 54 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 55 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 57 loadTestData2(array, buf.arrayOffset(), buf.capacity()); 58 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 61 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 64 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 68 int array[] 602 loadTestData1(int array[], int offset, int length) argument 608 loadTestData2(int array[], int offset, int length) argument 628 assertContentEquals(IntBuffer buf, int array[], int offset, int length) argument [all...] |
H A D | LongBufferTest.java | 51 long array[] = buf.array(); 52 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 54 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 55 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 57 loadTestData2(array, buf.arrayOffset(), buf.capacity()); 58 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 61 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 64 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 68 long array[] 609 loadTestData1(long array[], int offset, int length) argument 615 loadTestData2(long array[], int offset, int length) argument 635 assertContentEquals(LongBuffer buf, long array[], int offset, int length) argument [all...] |
H A D | ShortBufferTest.java | 50 short array[] = buf.array(); 51 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 53 loadTestData1(array, buf.arrayOffset(), buf.capacity()); 54 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 56 loadTestData2(array, buf.arrayOffset(), buf.capacity()); 57 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 60 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 63 assertContentEquals(buf, array, buf.arrayOffset(), buf.capacity()); 67 short array[] 589 loadTestData1(short array[], int offset, int length) argument 595 loadTestData2(short array[], int offset, int length) argument 615 assertContentEquals(ShortBuffer buf, short array[], int offset, int length) argument [all...] |
/libcore/json/src/main/java/org/json/ |
H A D | JSONArray.java | 65 * Unsupported values are not permitted and will yield an array in an 79 * Creates a new {@code JSONArray} with values from the next array in the 103 * @param json a JSON-encoded string containing an array. 112 * Creates a new {@code JSONArray} with values from the given primitive array. 114 public JSONArray(Object array) throws JSONException { argument 115 if (!array.getClass().isArray()) { 116 throw new JSONException("Not a primitive array: " + array.getClass()); 118 final int length = Array.getLength(array); 121 put(JSONObject.wrap(Array.get(array, [all...] |
/libcore/luni/src/main/java/java/util/concurrent/atomic/ |
H A D | AtomicIntegerArray.java | 13 * An {@code int} array in which elements may be updated atomically. 26 private final int[] array; field in class:AtomicIntegerArray 32 throw new Error("array index scale not a power of two"); 37 if (i < 0 || i >= array.length) 51 * @param length the length of the array 54 array = new int[length]; 59 * all elements copied from, the given array. 61 * @param array the array to copy elements from 62 * @throws NullPointerException if array i 64 AtomicIntegerArray(int[] array) argument [all...] |
H A D | AtomicLongArray.java | 13 * A {@code long} array in which elements may be updated atomically. 25 private final long[] array; field in class:AtomicLongArray 31 throw new Error("array index scale not a power of two"); 36 if (i < 0 || i >= array.length) 50 * @param length the length of the array 53 array = new long[length]; 58 * all elements copied from, the given array. 60 * @param array the array to copy elements from 61 * @throws NullPointerException if array i 63 AtomicLongArray(long[] array) argument [all...] |
/libcore/luni/src/test/java/libcore/java/util/ |
H A D | LocaleTest.java | 180 private static void assertOnce(Locale element, Locale[] array) { argument 182 for (Locale l : array) {
|
H A D | SpliteratorsTest.java | 101 String[] array = { "a", "b", "c", "d", "e", "f", "g", "h" }; 102 ArrayList<String> expectedValues = new ArrayList<>(Arrays.asList(array)); 104 Spliterator<String> sp = Spliterators.spliterator(array, 0); 108 sp = Spliterators.spliterator(array, 0); 111 sp = Spliterators.spliterator(array, 0); 114 sp = Spliterators.spliterator(array, 0); 117 sp = Spliterators.spliterator(array, 0); 120 sp = Spliterators.spliterator(array, 0); 124 sp = Spliterators.spliterator(array, Spliterator.ORDERED); 129 String[] array 158 final int[] array; field in class:SpliteratorsTest.PrimitiveIntArrayList 176 final long[] array; field in class:SpliteratorsTest.PrimitiveLongArrayList 194 final double[] array; field in class:SpliteratorsTest.PrimitiveDoubleArrayList [all...] |
/libcore/ojluni/src/main/java/java/util/ |
H A D | Spliterators.java | 117 * Creates a {@code Spliterator} covering the elements of a given array, 123 * which a Spliterator for an array is needed should use 132 * @param array The array, assumed to be unmodified during use 136 * @return A spliterator for an array 137 * @throws NullPointerException if the given array is {@code null} 140 public static <T> Spliterator<T> spliterator(Object[] array, argument 142 return new ArraySpliterator<>(Objects.requireNonNull(array), 148 * array, using a customized set of spliterator characteristics. 153 * which a Spliterator for an array i 175 spliterator(Object[] array, int fromIndex, int toIndex, int additionalCharacteristics) argument 204 spliterator(int[] array, int additionalCharacteristics) argument 237 spliterator(int[] array, int fromIndex, int toIndex, int additionalCharacteristics) argument 266 spliterator(long[] array, int additionalCharacteristics) argument 303 spliterator(long[] array, int fromIndex, int toIndex, int additionalCharacteristics) argument 332 spliterator(double[] array, int additionalCharacteristics) argument 369 spliterator(double[] array, int fromIndex, int toIndex, int additionalCharacteristics) argument 900 private final Object[] array; field in class:Spliterators.ArraySpliterator 912 ArraySpliterator(Object[] array, int additionalCharacteristics) argument 925 ArraySpliterator(Object[] array, int origin, int fence, int additionalCharacteristics) argument 985 private final int[] array; field in class:Spliterators.IntArraySpliterator 997 IntArraySpliterator(int[] array, int additionalCharacteristics) argument 1010 IntArraySpliterator(int[] array, int origin, int fence, int additionalCharacteristics) argument 1068 private final long[] array; field in class:Spliterators.LongArraySpliterator 1080 LongArraySpliterator(long[] array, int additionalCharacteristics) argument 1093 LongArraySpliterator(long[] array, int origin, int fence, int additionalCharacteristics) argument 1151 private final double[] array; field in class:Spliterators.DoubleArraySpliterator 1163 DoubleArraySpliterator(double[] array, int additionalCharacteristics) argument 1176 DoubleArraySpliterator(double[] array, int origin, int fence, int additionalCharacteristics) argument [all...] |