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

1234567891011>>

/frameworks/support/v7/appcompat/src/android/support/v7/content/res/
H A DGrowingArrayUtils.java23 * arrays. Common array operations are implemented for efficient use in dynamic containers.
25 * All methods in this class assume that the length of an array is equivalent to its capacity and
26 * 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
56 append(int[] array, int currentSize, int element) argument
71 append(long[] array, int currentSize, long element) argument
86 append(boolean[] array, int currentSize, boolean element) argument
109 insert(T[] array, int currentSize, int index, T element) argument
129 insert(int[] array, int currentSize, int index, int element) argument
148 insert(long[] array, int currentSize, int index, long element) argument
167 insert(boolean[] array, int currentSize, int index, boolean element) 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/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
102 append(float[] array, int currentSize, float element) argument
125 insert(T[] array, int currentSize, int index, T element) argument
146 insert(int[] array, int currentSize, int index, int element) argument
165 insert(long[] array, int currentSize, int index, long element) argument
184 insert(boolean[] array, int currentSize, int index, boolean element) argument
[all...]
H A DHexDump.java24 public static String dumpHexString(byte[] array) argument
26 return dumpHexString(array, 0, array.length);
29 public static String dumpHexString(byte[] array, int offset, int length) argument
62 byte b = array[i];
100 public static String toHexString(byte[] array) argument
102 return toHexString(array, 0, array.length, true);
105 public static String toHexString(byte[] array, boolean upperCase) argument
107 return toHexString(array,
110 toHexString(byte[] array, int offset, int length) argument
115 toHexString(byte[] array, int offset, int length, boolean upperCase) argument
[all...]
H A DArrayUtils.java81 * @param array1 the first byte array
82 * @param array2 the second byte array
106 * Returns an empty array of the specified type. The intent is that
107 * it will return the same empty array every time to avoid reallocation,
130 * Checks if given array is null or has zero elements.
132 public static boolean isEmpty(@Nullable Collection<?> array) { argument
133 return array == null || array.isEmpty();
137 * Checks if given array is null or has zero elements.
139 public static <T> boolean isEmpty(@Nullable T[] array) { argument
146 isEmpty(@ullable int[] array) argument
153 isEmpty(@ullable long[] array) argument
160 isEmpty(@ullable byte[] array) argument
167 isEmpty(@ullable boolean[] array) argument
177 contains(@ullable T[] array, T value) argument
185 indexOf(@ullable T[] array, T value) argument
196 containsAll(@ullable T[] array, T[] check) argument
209 containsAny(@ullable T[] array, T[] check) argument
219 contains(@ullable int[] array, int value) argument
229 contains(@ullable long[] array, long value) argument
239 total(@ullable long[] array) argument
262 appendElement(Class<T> kind, @Nullable T[] array, T element) argument
282 removeElement(Class<T> kind, @Nullable T[] array, T element) argument
410 cloneOrNull(@ullable long[] array) argument
414 cloneOrNull(@ullable ArraySet<T> array) argument
466 trimToSize(@ullable T[] array, int size) 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/base/core/tests/utiltests/src/android/util/
H A DMemoryIntArrayTest.java36 MemoryIntArray array = null;
38 array = new MemoryIntArray(3, false);
39 assertEquals("size must be three", 3, array.size());
41 IoUtils.closeQuietly(array);
47 MemoryIntArray array = null;
49 array = new MemoryIntArray(3, false);
51 array.set(0, 1);
52 array.set(1, 2);
53 array.set(2, 3);
55 assertEquals("First element should be 1", 1, array
[all...]
/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];
/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/libs/androidfw/tests/data/appaslib/
H A DR.h29 namespace array { namespace in namespace:appaslib::R::lib
43 namespace array { namespace in namespace:appaslib::R::app
/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,
/frameworks/base/libs/hwui/
H A DJankTracker.h25 #include <array>
45 std::array<uint32_t, NUM_BUCKETS> jankTypeCounts;
47 std::array<uint32_t, 57> frameCounts;
49 std::array<uint16_t, 97> slowFrameCounts;
80 std::array<int64_t, NUM_BUCKETS> mThresholds;
/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...]

Completed in 593 milliseconds

1234567891011>>