Searched defs:array (Results 1 - 25 of 73) sorted by relevance

123

/libcore/support/src/test/java/tests/support/
H A DSupport_TestResource.java21 final String array[] = {"Str1", "Str2", "Str3"}; field in class:Support_TestResource
27 { "parent4", "parentValue4" }, {"IntegerVal", 1}, {"StringArray", array}};
H A DSupport_Proxy_I2.java22 int[] array(long[] f); method in interface:Support_Proxy_I2
H A DSupport_Proxy_I1.java23 int[] array(long[] f); method in interface:Support_Proxy_I1
/libcore/luni/src/main/java/libcore/reflect/
H A DListOfVariables.java23 final ArrayList<TypeVariable<?>> array = new ArrayList<TypeVariable<?>>(); field in class:ListOfVariables
26 array.add(elem);
30 TypeVariable<?>[] a = new TypeVariable[array.size()];
31 return array.toArray(a);
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
H A DGenericArrayTypeTest.java31 T[] array; field in class:GenericArrayTypeTest.A
36 Field field = clazz.getDeclaredField("array");
48 B<T>[] array; field in class:GenericArrayTypeTest.B
53 Field field = clazz.getDeclaredField("array");
H A DGenericReflectionTestsBase.java57 public static void assertLenghtOne(Object[] array) { argument
58 TestCase.assertEquals("Array does NOT contain exactly one element.", 1, array.length);
61 public static void assertLenghtZero(Object[] array) { argument
62 TestCase.assertEquals("Array has more than zero elements.", 0, array.length);
/libcore/jsr166-tests/src/test/java/jsr166/
H A DThreadLocalTest.java67 ITLThread(int[] array) { x = array; } argument
/libcore/luni/src/main/java/libcore/internal/
H A DStringPool.java41 * Returns a string equal to {@code new String(array, start, length)}.
43 public String get(char[] array, int start, int length) { argument
47 hashCode = (hashCode * 31) + array[i];
56 if (pooled != null && contentEquals(pooled, array, start, length)) {
60 String result = new String(array, start, length);
/libcore/ojluni/src/main/java/java/lang/reflect/
H A DAccessibleObject.java63 * array of objects with a single security check (for efficiency).
71 * {@code array} may not be changed (for example, if the element
74 * accessibility of objects is set to {@code flag} for array elements
79 * @param array the array of AccessibleObjects
86 public static void setAccessible(AccessibleObject[] array, boolean flag) argument
88 for (int i = 0; i < array.length; i++) {
89 setAccessible0(array[i], flag);
/libcore/benchmarks/src/benchmarks/
H A DDeepArrayOpsBenchmark.java27 private Object[] array; field in class:DeepArrayOpsBenchmark
34 array = new Object[arrayLength * 13];
37 array[i] = new IntWrapper(i);
40 array[i + 1] = new16ElementObjectarray();
43 array[i + 2] = new boolean[16];
46 array[i + 3] = new byte[16];
49 array[i + 4] = new char[16];
52 array[i + 5] = new short[16];
55 array[i + 6] = new float[16];
58 array[
[all...]
/libcore/json/src/test/java/org/json/
H A DSelfUseTest.java77 private final JSONArray array = new JSONArray() { field in class:SelfUseTest
161 array.put("foo");
162 array.put("baz");
163 array.put("bar");
164 object.toJSONArray(array);
172 array.put(10, false);
177 array.isNull(5);
182 array.put(true);
183 array.getBoolean(0);
188 array
[all...]
H A DParsingTest.java150 assertParsed(array(), "[]");
151 assertParsed(array(5, 6, true), "[5,6,true]");
152 assertParsed(array(5, 6, array()), "[5,6,[]]");
153 assertParsed(array(5, 6, 7), "[5;6;7]");
154 assertParsed(array(5, 6, 7), "[5 , 6 \t; \r\n 7\n]");
155 assertParsed(array(5, 6, 7, null), "[5,6,7,]");
156 assertParsed(array(null, null), "[,]");
157 assertParsed(array(5, null, null, null, 5), "[5,,,,5]");
158 assertParsed(array(nul
220 private JSONArray array(Object... elements) { method in class:ParsingTest
[all...]
/libcore/luni/src/main/native/
H A Dlibcore_icu_TimeZoneNames.cpp48 static bool setStringArrayElement(JNIEnv* env, jobjectArray array, int i, const icu::UnicodeString& s) { argument
59 env->SetObjectArrayElement(array, i, javaString.get());
/libcore/luni/src/test/java/libcore/java/io/
H A DDataOutputStreamTest.java129 * Returns a string representation of a byte array that's more useful for debugging.
132 public static String toHexString(byte[] array) { argument
133 if (array == null) {
136 if (array.length == 0) {
142 sb.append(String.format("%02x", array[0] & 0xff));
143 for (int i = 1; i < array.length; i++) {
145 sb.append(String.format("%02x", array[i] & 0xff));
/libcore/luni/src/test/java/libcore/java/lang/reflect/
H A DGenericExceptionsTest.java91 private <T> T getOnlyValue(Object[] array, Class<T> expectedType) { argument
92 assertEquals("Expected a " + expectedType.getName() + " but was " + Arrays.toString(array),
93 1, array.length);
94 assertTrue("Expected a " + expectedType.getName() + " but was " + array[0],
95 expectedType.isInstance(array[0]));
96 return expectedType.cast(array[0]);
/libcore/ojluni/src/main/java/java/util/
H A DArrayPrefixHelpers.java46 * When true, they cumulate array elements. CUMULATE is set at
73 /** The smallest subtask array partition size to use as threshold */
77 final T[] array; field in class:ArrayPrefixHelpers.CumulateTask
86 T[] array, int lo, int hi) {
88 this.function = function; this.array = array;
98 T[] array, int origin, int fence, int threshold,
101 this.function = function; this.array = array;
110 if ((fn = this.function) == null || (a = this.array)
84 CumulateTask(CumulateTask<T> parent, BinaryOperator<T> function, T[] array, int lo, int hi) argument
97 CumulateTask(CumulateTask<T> parent, BinaryOperator<T> function, T[] array, int origin, int fence, int threshold, int lo, int hi) argument
229 final long[] array; field in class:ArrayPrefixHelpers.LongCumulateTask
236 LongCumulateTask(LongCumulateTask parent, LongBinaryOperator function, long[] array, int lo, int hi) argument
249 LongCumulateTask(LongCumulateTask parent, LongBinaryOperator function, long[] array, int origin, int fence, int threshold, int lo, int hi) argument
379 final double[] array; field in class:ArrayPrefixHelpers.DoubleCumulateTask
386 DoubleCumulateTask(DoubleCumulateTask parent, DoubleBinaryOperator function, double[] array, int lo, int hi) argument
399 DoubleCumulateTask(DoubleCumulateTask parent, DoubleBinaryOperator function, double[] array, int origin, int fence, int threshold, int lo, int hi) argument
529 final int[] array; field in class:ArrayPrefixHelpers.IntCumulateTask
536 IntCumulateTask(IntCumulateTask parent, IntBinaryOperator function, int[] array, int lo, int hi) argument
549 IntCumulateTask(IntCumulateTask parent, IntBinaryOperator function, int[] array, int origin, int fence, int threshold, int lo, int hi) argument
[all...]
/libcore/ojluni/src/main/native/
H A Dio_util.c64 * Returns true if the array slice defined by the given offset and length
68 outOfBounds(JNIEnv *env, jint off, jint len, jbyteArray array) { argument
73 ((*env)->GetArrayLength(env, array) - off < len));
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
H A DDoubleNodeTest.java43 double[] array = new double[size];
44 for (int i = 0; i < array.length; i++) {
45 array[i] = i;
50 nodes.add(Nodes.node(array));
51 nodes.add(degenerateTree(Spliterators.iterator(Arrays.spliterator(array))));
52 nodes.add(tree(toList(array), l -> Nodes.node(toDoubleArray(l))));
53 nodes.add(fill(array, Nodes.doubleBuilder(array.length)));
54 nodes.add(fill(array, Nodes.doubleBuilder()));
57 params.add(new Object[]{array, nod
65 assertEqualsListDoubleArray(List<Double> list, double[] array) argument
90 fill(double[] array, Node.Builder.OfDouble nb) argument
124 testAsArray(double[] array, Node.OfDouble n) argument
129 testFlattenAsArray(double[] array, Node.OfDouble n) argument
134 testCopyTo(double[] array, Node.OfDouble n) argument
142 testForEach(double[] array, Node.OfDouble n) argument
152 testStreams(double[] array, Node.OfDouble n) argument
162 testSpliterator(double[] array, Node.OfDouble n) argument
167 testTruncate(double[] array, Node.OfDouble n) argument
[all...]
H A DIntNodeTest.java43 int[] array = new int[size];
44 for (int i = 0; i < array.length; i++) {
45 array[i] = i;
50 nodes.add(Nodes.node(array));
51 nodes.add(degenerateTree(Spliterators.iterator(Arrays.spliterator(array))));
52 nodes.add(tree(toList(array), l -> Nodes.node(toIntArray(l))));
53 nodes.add(fill(array, Nodes.intBuilder(array.length)));
54 nodes.add(fill(array, Nodes.intBuilder()));
57 params.add(new Object[]{array, nod
65 assertEqualsListIntArray(List<Integer> list, int[] array) argument
90 fill(int[] array, Node.Builder.OfInt nb) argument
124 testAsArray(int[] array, Node.OfInt n) argument
129 testFlattenAsArray(int[] array, Node.OfInt n) argument
134 testCopyTo(int[] array, Node.OfInt n) argument
142 testForEach(int[] array, Node.OfInt n) argument
152 testStreams(int[] array, Node.OfInt n) argument
160 testSpliterator(int[] array, Node.OfInt n) argument
165 testTruncate(int[] array, Node.OfInt n) argument
[all...]
H A DLongNodeTest.java43 long[] array = new long[size];
44 for (int i = 0; i < array.length; i++) {
45 array[i] = i;
50 nodes.add(Nodes.node(array));
51 nodes.add(degenerateTree(Spliterators.iterator(Arrays.spliterator(array))));
52 nodes.add(tree(toList(array), l -> Nodes.node(toLongArray(l))));
53 nodes.add(fill(array, Nodes.longBuilder(array.length)));
54 nodes.add(fill(array, Nodes.longBuilder()));
57 params.add(new Object[]{array, nod
65 assertEqualsListLongArray(List<Long> list, long[] array) argument
90 fill(long[] array, Node.Builder.OfLong nb) argument
124 testAsArray(long[] array, Node.OfLong n) argument
129 testFlattenAsArray(long[] array, Node.OfLong n) argument
134 testCopyTo(long[] array, Node.OfLong n) argument
142 testForEach(long[] array, Node.OfLong n) argument
152 testStreams(long[] array, Node.OfLong n) argument
161 testSpliterator(long[] array, Node.OfLong n) argument
166 testTruncate(long[] array, Node.OfLong n) argument
[all...]
H A DNodeTest.java43 Integer[] array = new Integer[size];
44 for (int i = 0; i < array.length; i++) {
45 array[i] = i;
49 nodes.add(Nodes.node(array));
50 nodes.add(Nodes.node(Arrays.asList(array)));
51 nodes.add(degenerateTree(Arrays.asList(array).iterator()));
52 nodes.add(tree(Arrays.asList(array), l -> Nodes.node(l.toArray(new Integer[l.size()]))));
53 nodes.add(tree(Arrays.asList(array), l -> Nodes.node(l)));
54 nodes.add(fill(array, Nodes.builder(array
66 fill(Integer[] array, Node.Builder<Integer> nb) argument
101 testAsArray(Integer[] array, Node<Integer> n) argument
106 testFlattenAsArray(Integer[] array, Node<Integer> n) argument
112 testCopyTo(Integer[] array, Node<Integer> n) argument
120 testForEach(Integer[] array, Node<Integer> n) argument
128 testStreams(Integer[] array, Node<Integer> n) argument
137 testSpliterator(Integer[] array, Node<Integer> n) argument
142 testTruncate(Integer[] array, Node<Integer> n) argument
[all...]
H A DSpinedBufferTest.java65 int[] array = IntStream.range(0, size).toArray();
68 Arrays.stream(array).boxed().forEach(sb);
69 params.add(new Object[]{array, sb});
72 Arrays.stream(array).boxed().forEach(sb);
73 params.add(new Object[]{array, sb});
76 Arrays.stream(array).boxed().forEach(sb);
77 params.add(new Object[]{array, sb});
80 Arrays.stream(array).boxed().forEach(sb);
81 params.add(new Object[]{array, sb});
88 public void testSpliterator(int[] array, SpinedBuffe argument
96 testLastSplit(int[] array, SpinedBuffer<Integer> sb) argument
163 testIntSpliterator(int[] array, SpinedBuffer.OfInt sb) argument
171 testIntLastSplit(int[] array, SpinedBuffer.OfInt sb) argument
238 testLongSpliterator(long[] array, SpinedBuffer.OfLong sb) argument
246 testLongLastSplit(long[] array, SpinedBuffer.OfLong sb) argument
314 testDoubleSpliterator(double[] array, SpinedBuffer.OfDouble sb) argument
322 testLongLastSplit(double[] array, SpinedBuffer.OfDouble sb) argument
[all...]
/libcore/json/src/main/java/org/json/
H A DJSONStringer.java34 * <li>The stringer must have exactly one top-level array or object.
35 * <li>Lexical scopes must be balanced: every call to {@link #array} must
63 /** The output data, containing at most one top-level array or object. */
74 * An array with no elements requires no separators or newlines before
80 * A array with at least one value requires a comma and newline before
104 * A special bracketless array needed by JSONStringer.join() and
133 * Begins encoding a new array. Each call to this method must be paired with
138 public JSONStringer array() throws JSONException { method in class:JSONStringer
143 * Ends encoding the current array.
396 * inline array, o
[all...]
/libcore/luni/src/main/java/java/util/concurrent/
H A DDelayQueue.java387 * Returns an array containing all of the elements in this queue.
388 * The returned array elements are in no particular order.
390 * <p>The returned array will be "safe" in that no references to it are
392 * a new array). The caller is thus free to modify the returned array.
394 * <p>This method acts as bridge between array-based and collection-based
397 * @return an array containing all of the elements in this queue
410 * Returns an array containing all of the elements in this queue; the
411 * runtime type of the returned array is that of the specified array
504 final Object[] array; // Array of all elements field in class:DelayQueue.Itr
508 Itr(Object[] array) argument
[all...]
/libcore/luni/src/main/java/java/util/concurrent/atomic/
H A DAtomicReferenceArray.java15 * An array of object references in which elements may be updated
21 * @param <E> The base class of elements held in this array
30 private final Object[] array; // must have exact type Object[] field in class:AtomicReferenceArray
35 (AtomicReferenceArray.class.getDeclaredField("array"));
39 throw new Error("array index scale not a power of two");
47 if (i < 0 || i >= array.length)
61 * @param length the length of the array
64 array = new Object[length];
69 * all elements copied from, the given array.
71 * @param array th
74 AtomicReferenceArray(E[] array) argument
[all...]

Completed in 506 milliseconds

123