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/java/util/
H A DUnsafeArrayList.java22 * An array-backed list that exposes its array.
28 private T[] array; field in class:UnsafeArrayList
32 this.array = (T[]) Array.newInstance(elementType, initialCapacity);
37 if (size == array.length) {
39 System.arraycopy(array, 0, newArray, 0, size);
40 array = newArray;
42 array[size++] = element;
47 public T[] array() { method in class:UnsafeArrayList
48 return array;
[all...]
H A DCollection.java281 * Returns a new array containing all elements contained in this {@code Collection}.
284 * array in the same order as an iterator would return them.
286 * The array returned does not reflect any changes of the {@code Collection}. A new
287 * array is created even if the underlying data structure is already an
288 * array.
290 * @return an array of the elements from this {@code Collection}.
295 * Returns an array containing all elements contained in this {@code Collection}. If
296 * the specified array is large enough to hold the elements, the specified
297 * array is used, otherwise an array o
315 toArray(T[] array) argument
[all...]
H A DSet.java174 * Returns an array containing all elements contained in this set.
176 * @return an array of the elements from this set.
181 * Returns an array containing all elements contained in this set. If the
182 * specified array is large enough to hold the elements, the specified array
183 * is used, otherwise an array of the same type is created. If the specified
184 * array is used and is larger than this set, the array element following
187 * @param array
188 * the array
195 toArray(T[] array) argument
[all...]
/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/luni/src/main/java/org/apache/harmony/security/utils/
H A DArray.java46 * Represents <code>array</code> as <code>String</code>
49 * @param array to be represented as <code>String</code>
51 * @return <code>String</code> representation of the <code>array</code>
53 public static String toString(byte[] array, String prefix) { argument
66 for (i=0; i<array.length; i++) {
79 sb.append(Byte.toHexString(array[i], false));
81 int currentByte = (0xff & array[i]);
H A DObjectIdentifier.java42 //OID as array of integers
61 * Creates ObjectIdentifier(OID) from array of integers.
63 * @param oid - array of integers
76 * Creates ObjectIdentifier(OID) from array of integers.
78 * @param oid - array of integers
128 * representation as array of integers, otherwise false
184 * @param oid - oid as array of integers
206 * Returns hash code for array of integers
208 * @param oid - array of integers
210 public static int hashIntArray(int[] array) { argument
[all...]
/libcore/benchmarks/src/benchmarks/
H A DDeepArrayOpsBenchmark.java29 private Object[] array; field in class:DeepArrayOpsBenchmark
36 array = new Object[arrayLength * 13];
39 array[i] = new IntWrapper(i);
42 array[i + 1] = new16ElementObjectarray();
45 array[i + 2] = new boolean[16];
48 array[i + 3] = new byte[16];
51 array[i + 4] = new char[16];
54 array[i + 5] = new short[16];
57 array[i + 6] = new float[16];
60 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/java/java/io/
H A DSerializationHandleMap.java74 private int findIndex(Object key, Object[] array) { argument
75 int length = array.length;
79 if (array[index] == key || array[index] == null) {
/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/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/lang/reflect/
H A DArray.java43 throw new IllegalArgumentException("Not an array: " + o.getClass());
50 private static RuntimeException badArray(Object array) { argument
51 if (array == null) {
52 throw new NullPointerException("array == null");
53 } else if (!array.getClass().isArray()) {
54 throw notAnArray(array);
56 throw incompatibleType(array);
61 * Returns the element of the array at the specified index. Equivalent to {@code array[index]}.
62 * If the array componen
70 get(Object array, int index) argument
114 getBoolean(Object array, int index) argument
131 getByte(Object array, int index) argument
148 getChar(Object array, int index) argument
166 getDouble(Object array, int index) argument
196 getFloat(Object array, int index) argument
224 getInt(Object array, int index) argument
244 getLength(Object array) argument
278 getLong(Object array, int index) argument
304 getShort(Object array, int index) argument
394 set(Object array, int index, Object value) argument
438 setBoolean(Object array, int index, boolean value) argument
456 setByte(Object array, int index, byte value) argument
484 setChar(Object array, int index, char value) argument
510 setDouble(Object array, int index, double value) argument
528 setFloat(Object array, int index, float value) argument
548 setInt(Object array, int index, int value) argument
572 setLong(Object array, int index, long value) argument
594 setShort(Object array, int index, short value) argument
[all...]
/libcore/luni/src/main/java/java/nio/
H A DBuffer.java101 * Returns the array that backs this buffer (optional operation).
102 * The returned value is the actual array, not a copy, so modifications
103 * to the array write through to the buffer.
106 * to provide the exact type of the array.
111 * @return the array
113 * UnsupportedOperationException if the buffer does not expose an array
116 public abstract Object array(); method in class:Buffer
119 * Returns the offset into the array returned by {@code array} of the first
120 * element of the buffer (optional operation). The backing array (i
[all...]
H A DCharArrayBuffer.java31 CharArrayBuffer(char[] array) { argument
32 this(array.length, array, 0, false);
H A DDoubleArrayBuffer.java31 DoubleArrayBuffer(double[] array) { argument
32 this(array.length, array, 0, false);

Completed in 2849 milliseconds

123