Searched refs:array (Results 1 - 25 of 362) sorted by relevance

1234567891011>>

/frameworks/base/core/java/com/android/internal/util/
H A DGrowingArrayUtils.java21 * arrays. Common array operations are implemented for efficient use in dynamic containers.
23 * All methods in this class assume that the length of an array is equivalent to its capacity and
24 * NOT the number of elements in the array. The current size of the array is always passed in as a
32 * Appends an element to the end of the array, growing the array if there is no more room.
33 * @param array The array to which to append the element. This must NOT be null.
34 * @param currentSize The number of elements in the array. Must be less than or equal to
35 * array
40 append(T[] array, int currentSize, T element) argument
57 append(int[] array, int currentSize, int element) argument
72 append(long[] array, int currentSize, long element) argument
87 append(boolean[] array, int currentSize, boolean element) argument
110 insert(T[] array, int currentSize, int index, T element) argument
131 insert(int[] array, int currentSize, int index, int element) argument
150 insert(long[] array, int currentSize, int index, long element) argument
169 insert(boolean[] array, int currentSize, int index, boolean element) argument
[all...]
H A DHexDump.java23 public static String dumpHexString(byte[] array) argument
25 return dumpHexString(array, 0, array.length);
28 public static String dumpHexString(byte[] array, int offset, int length) argument
61 byte b = array[i];
99 public static String toHexString(byte[] array) argument
101 return toHexString(array, 0, array.length);
104 public static String toHexString(byte[] array, int offset, int length) argument
111 byte b = array[
[all...]
H A DArrayUtils.java77 * @param array1 the first byte array
78 * @param array2 the second byte array
102 * Returns an empty array of the specified type. The intent is that
103 * it will return the same empty array every time to avoid reallocation,
126 * Checks if given array is null or has zero elements.
128 public static <T> boolean isEmpty(T[] array) { argument
129 return array == null || array.length == 0;
133 * Checks if given array is null or has zero elements.
135 public static boolean isEmpty(int[] array) { argument
142 isEmpty(long[] array) argument
152 contains(T[] array, T value) argument
160 indexOf(T[] array, T value) argument
171 containsAll(T[] array, T[] check) argument
181 contains(int[] array, int value) argument
191 contains(long[] array, long value) argument
201 total(long[] array) argument
214 appendElement(Class<T> kind, @Nullable T[] array, T element) argument
234 removeElement(Class<T> kind, @Nullable T[] array, T element) argument
362 cloneOrNull(long[] array) argument
[all...]
/frameworks/base/core/java/android/hardware/camera2/utils/
H A DHashCodeHelpers.java29 * @param array a non-{@code null} array of integers
33 public static int hashCode(int... array) { argument
34 if (array == null) {
46 for (int x : array) {
59 * @param array a non-{@code null} array of floats
63 public static int hashCode(float... array) { argument
64 if (array == null) {
69 for (float f : array) {
86 hashCodeGeneric(T... array) argument
[all...]
H A DArrayUtils.java26 * Various assortment of array utilities.
33 /** Return the index of {@code needle} in the {@code array}, or else {@code -1} */
34 public static <T> int getArrayIndex(T[] array, T needle) { argument
35 if (array == null) {
40 for (T elem : array) {
50 /** Return the index of {@code needle} in the {@code array}, or else {@code -1} */
51 public static int getArrayIndex(int[] array, int needle) { argument
52 if (array == null) {
55 for (int i = 0; i < array.length; ++i) {
56 if (array[
166 contains(int[] array, int elem) argument
177 contains(T[] array, T elem) argument
[all...]
/frameworks/base/core/java/android/animation/
H A DFloatArrayEvaluator.java21 * Each index into the array is treated as a separate value to interpolate. For example,
45 * @param reuseArray The array to modify and return from <code>evaluate</code>.
65 float[] array = mArray;
66 if (array == null) {
67 array = new float[startValue.length];
70 for (int i = 0; i < array.length; i++) {
73 array[i] = start + (fraction * (end - start));
75 return array;
H A DIntArrayEvaluator.java21 * Each index into the array is treated as a separate value to interpolate. For example,
45 * @param reuseArray The array to modify and return from <code>evaluate</code>.
64 int[] array = mArray;
65 if (array == null) {
66 array = new int[startValue.length];
68 for (int i = 0; i < array.length; i++) {
71 array[i] = (int) (start + (fraction * (end - start)));
73 return array;
/frameworks/support/v4/jellybean/android/support/v4/app/
H A DBundleUtil.java13 * Get an array of Bundle objects from a parcelable array field in a bundle.
14 * Update the bundle to have a typed array so fetches in the future don't need
15 * to do an array copy.
18 Parcelable[] array = bundle.getParcelableArray(key);
19 if (array instanceof Bundle[] || array == null) {
20 return (Bundle[]) array;
22 Bundle[] typedArray = Arrays.copyOf(array, array
[all...]
/frameworks/base/graphics/java/android/graphics/
H A DColorMatrixColorFilter.java43 * @param array Array of floats used to transform colors, treated as a 4x5
44 * matrix. The first 20 entries of the array are copied into
47 public ColorMatrixColorFilter(float[] array) { argument
48 if (array.length < 20) {
51 mMatrix.set(array);
95 * @param array Array of floats used to transform colors, treated as a 4x5
96 * matrix. The first 20 entries of the array are copied into
103 * @throws ArrayIndexOutOfBoundsException if the specified array's
108 public void setColorMatrix(float[] array) { argument
109 if (array
127 nativeColorMatrixFilter(float[] array) argument
[all...]
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
H A DByteArrayHelpers.java32 * Convert an array of byte primitives to a {@code byte[]} using native endian order.
37 * @param array array of primitives
38 * @return array
40 public static byte[] toByteArray(byte[] array) { argument
41 return array;
45 * Convert an array of shorts to a {@code byte[]} using native endian order.
47 * @param array array of shorts
48 * @return array converte
50 toByteArray(short[] array) argument
60 toByteArray(char[] array) argument
69 toByteArray(int[] array) argument
78 toByteArray(long[] array) argument
87 toByteArray(float[] array) argument
96 toByteArray(double[] array) argument
111 toByteArray(T array) argument
213 toByteArray(T array, int sizeOfTBits) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/util/
H A DLongSparseLongArrayTest.java33 final LongSparseLongArray array = new LongSparseLongArray(5);
36 array.put(value, value);
40 assertEquals(value, array.get(value, -1));
41 assertEquals(-1, array.get(-value, -1));
46 final LongSparseLongArray array = new LongSparseLongArray(5);
49 array.put(value, value);
53 assertEquals(value, array.get(value, -1));
54 assertEquals(-1, array.get(-value, -1));
59 final LongSparseLongArray array = new LongSparseLongArray(5);
62 array
[all...]
/frameworks/base/keystore/java/android/security/keystore/
H A DArrayUtils.java27 public static String[] nullToEmpty(String[] array) { argument
28 return (array != null) ? array : EmptyArray.STRING;
31 public static String[] cloneIfNotEmpty(String[] array) { argument
32 return ((array != null) && (array.length > 0)) ? array.clone() : array;
35 public static byte[] cloneIfNotEmpty(byte[] array) { argument
36 return ((array !
[all...]
/frameworks/base/core/java/android/text/
H A DTextDirectionHeuristic.java24 * Guess if a chars array is in the RTL direction or not.
26 * @param array the char array.
29 * {@code array.length - start}.
33 boolean isRtl(char[] array, int start, int count); argument
/frameworks/base/core/java/android/util/
H A DContainerHelpers.java22 static int binarySearch(int[] array, int size, int value) { argument
28 final int midVal = array[mid];
41 static int binarySearch(long[] array, int size, long value) { argument
47 final long midVal = array[mid];
H A DArraySet.java31 * separate from ArrayMap, however, so the Object array contains only one item for each
37 * and deleting entries in the array. For containers holding up to hundreds of items,
41 * standard Java containers it will shrink its array as items are removed from it. Currently
57 * Maximum number of entries to have in array caches.
62 * Caches of small array objects to avoid spamming garbage. The cache
63 * Object[] variable is a pointer to a linked list of array objects.
64 * The first entry in the array is a pointer to the next array in the
65 * list; the second entry is a pointer to the int[] hash code array for it.
110 // hash chain to reduce the number of array entrie
188 freeArrays(final int[] hashes, final Object[] array, final int size) argument
390 addAll(ArraySet<? extends E> array) argument
479 removeAll(ArraySet<? extends E> array) argument
511 toArray(T[] array) argument
[all...]
/frameworks/base/tools/layoutlib/bridge/tests/res/testApp/MyApplication/build/intermediates/classes/debug/com/android/layoutlib/test/myapplication/
H A DR$array.class ... android.layoutlib.test.myapplication.R$array extends java.lang.Object { public static final int ...
/frameworks/support/v4/java/android/support/v4/text/
H A DTextDirectionHeuristicCompat.java24 * Guess if a chars array is in the RTL direction or not.
26 * @param array the char array.
29 * {@code array.length - start}.
33 boolean isRtl(char[] array, int start, int count); argument
/frameworks/av/drm/mediadrm/plugins/clearkey/
H A DUtils.cpp27 return memcmp((void *)lhs.array(), (void *)rhs.array(), rhs.size()) < 0;
/frameworks/base/core/java/android/bluetooth/le/
H A DBluetoothLeUtils.java38 static String toString(SparseArray<byte[]> array) { argument
39 if (array == null) {
42 if (array.size() == 0) {
47 for (int i = 0; i < array.size(); ++i) {
48 buffer.append(array.keyAt(i)).append("=").append(Arrays.toString(array.valueAt(i)));
82 static boolean equals(SparseArray<byte[]> array, SparseArray<byte[]> otherArray) { argument
83 if (array == otherArray) {
86 if (array == null || otherArray == null) {
89 if (array
[all...]
/frameworks/native/opengl/tools/glgen/stubs/gles11/
H A Dcommon.cpp77 getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) argument
91 *array = NULL;
95 *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass,
105 static void* Get(JNIEnv* _env, jbyteArray array, jboolean* is_copy) { argument
106 return _env->GetByteArrayElements(array, is_copy);
111 static void* Get(JNIEnv* _env, jbooleanArray array, jboolean* is_copy) { argument
112 return _env->GetBooleanArrayElements(array, is_copy);
117 static void* Get(JNIEnv* _env, jcharArray array, jboolean* is_copy) { argument
118 return _env->GetCharArrayElements(array, is_copy);
123 static void* Get(JNIEnv* _env, jshortArray array, jboolea argument
129 Get(JNIEnv* _env, jintArray array, jboolean* is_copy) argument
135 Get(JNIEnv* _env, jlongArray array, jboolean* is_copy) argument
141 Get(JNIEnv* _env, jfloatArray array, jboolean* is_copy) argument
147 Get(JNIEnv* _env, jdoubleArray array, jboolean* is_copy) argument
154 getArrayPointer(JNIEnv *_env, JTYPEARRAY array, jboolean* is_copy) argument
160 Release(JNIEnv* _env, jbyteArray array, jbyte* data, jboolean commit) argument
166 Release(JNIEnv* _env, jbooleanArray array, jboolean* data, jboolean commit) argument
172 Release(JNIEnv* _env, jcharArray array, jchar* data, jboolean commit) argument
178 Release(JNIEnv* _env, jshortArray array, jshort* data, jboolean commit) argument
184 Release(JNIEnv* _env, jintArray array, jint* data, jboolean commit) argument
190 Release(JNIEnv* _env, jlongArray array, jlong* data, jboolean commit) argument
196 Release(JNIEnv* _env, jfloatArray array, jfloat* data, jboolean commit) argument
202 Release(JNIEnv* _env, jdoubleArray array, jdouble* data, jboolean commit) argument
209 releaseArrayPointer(JNIEnv *_env, JTYPEARRAY array, NTYPEARRAY data, jboolean commit) argument
214 releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_nio_utils.cpp31 void* android::nio_getPointer(JNIEnv *_env, jobject buffer, jarray *array) { argument
32 assert(array);
41 *array = NULL;
45 *array = (jarray) _env->CallStaticObjectMethod(gNioJNI.nioAccessClass,
49 data = _env->GetPrimitiveArrayCritical(*array, (jboolean *) 0);
55 void android::nio_releasePointer(JNIEnv *_env, jarray array, void *data, argument
57 _env->ReleasePrimitiveArrayCritical(array, data,
H A Dandroid_nio_utils.h28 * (and releasePointer if array is returned non-null) must be done in the
33 * @param array REQUIRED. Output. If on return it is set to non-null, then
34 * nio_releasePointer must be called with the array
40 void* nio_getPointer(JNIEnv *env, jobject buffer, jarray *array);
43 * Call this if android_nio_getPointer returned non-null in its array parameter.
44 * Pass that array and the returned pointer when you are done accessing the
45 * pointer. If called (i.e. array is non-null), it must be called in the same
49 * @param buffer The array returned from android_nio_getPointer (!= null)
54 void nio_releasePointer(JNIEnv *env, jarray array, void *pointer,
/frameworks/support/v4/java/android/support/v4/util/
H A DSimpleArrayMap.java42 * Maximum number of entries to have in array caches.
47 * Caches of small array objects to avoid spamming garbage. The cache
48 * Object[] variable is a pointer to a linked list of array objects.
49 * The first entry in the array is a pointer to the next array in the
50 * list; the second entry is a pointer to the int[] hash code array for it.
94 // hash chain to reduce the number of array entries that will
132 // hash chain to reduce the number of array entries that will
141 final Object[] array = mTwiceBaseCache;
142 mArray = array;
172 freeArrays(final int[] hashes, final Object[] array, final int size) argument
428 putAll(SimpleArrayMap<? extends K, ? extends V> array) argument
[all...]
/frameworks/base/core/java/android/hardware/camera2/dispatch/
H A DArgumentReplacingDispatcher.java77 private static Object[] arrayCopy(Object[] array) { argument
78 int length = array.length;
81 newArray[i] = array[i];
/frameworks/base/core/tests/inputmethodtests/src/android/os/
H A DInputMethodSubtypeArrayTest.java35 final InputMethodSubtypeArray array = new InputMethodSubtypeArray(subtypes);
36 assertEquals(subtypes.size(), array.getCount());
37 assertEquals(subtypes.get(0), array.get(0));
38 assertEquals(subtypes.get(1), array.get(1));
39 assertEquals(subtypes.get(2), array.get(2));
41 final InputMethodSubtypeArray clonedArray = cloneViaParcel(array);

Completed in 9873 milliseconds

1234567891011>>