Searched refs:array (Results 1 - 25 of 552) 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 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
174 size(@ullable Object[] array) argument
184 contains(@ullable T[] array, T value) argument
192 indexOf(@ullable T[] array, T value) argument
203 containsAll(@ullable T[] array, T[] check) argument
216 containsAny(@ullable T[] array, T[] check) argument
226 contains(@ullable int[] array, int value) argument
236 contains(@ullable long[] array, long value) argument
246 contains(@ullable char[] array, char value) argument
259 containsAll(@ullable char[] array, char[] check) argument
269 total(@ullable long[] array) argument
292 appendElement(Class<T> kind, @Nullable T[] array, T element) argument
300 appendElement(Class<T> kind, @Nullable T[] array, T element, boolean allowDuplicates) argument
321 removeElement(Class<T> kind, @Nullable T[] array, T element) argument
459 cloneOrNull(@ullable long[] array) argument
463 cloneOrNull(@ullable ArraySet<T> array) argument
511 trimToSize(@ullable T[] array, int size) 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...]
/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/compat/jellybean/android/support/v4/app/
H A DBundleUtil.java10 * Get an array of Bundle objects from a parcelable array field in a bundle.
11 * Update the bundle to have a typed array so fetches in the future don't need
12 * to do an array copy.
15 Parcelable[] array = bundle.getParcelableArray(key);
16 if (array instanceof Bundle[] || array == null) {
17 return (Bundle[]) array;
19 Bundle[] typedArray = Arrays.copyOf(array, array
[all...]
/frameworks/support/transition/src/android/support/transition/
H A DFloatArrayEvaluator.java23 * Each index into the array is treated as a separate value to interpolate. For example,
37 * @param reuseArray The array to modify and return from <code>evaluate</code>.
57 float[] array = mArray;
58 if (array == null) {
59 array = new float[startValue.length];
62 for (int i = 0; i < array.length; i++) {
65 array[i] = start + (fraction * (end - start));
67 return array;
/frameworks/base/graphics/java/android/graphics/
H A DColorMatrixColorFilter.java45 * @param array Array of floats used to transform colors, treated as a 4x5
46 * matrix. The first 20 entries of the array are copied into
49 public ColorMatrixColorFilter(@NonNull float[] array) { argument
50 if (array.length < 20) {
53 mMatrix.set(array);
94 * @param array Array of floats used to transform colors, treated as a 4x5
95 * matrix. The first 20 entries of the array are copied into
102 * @throws ArrayIndexOutOfBoundsException if the specified array's
107 public void setColorMatrixArray(@Nullable float[] array) { argument
110 if (array
125 nativeColorMatrixFilter(float[] array) argument
[all...]
/frameworks/base/core/tests/utiltests/src/android/util/
H A DMemoryIntArrayTest.java44 MemoryIntArray array = null;
46 array = new MemoryIntArray(3);
47 assertEquals("size must be three", 3, array.size());
49 IoUtils.closeQuietly(array);
55 MemoryIntArray array = null;
57 array = new MemoryIntArray(3);
59 array.set(0, 1);
60 array.set(1, 2);
61 array.set(2, 3);
63 assertEquals("First element should be 1", 1, array
[all...]
/frameworks/base/core/java/android/os/
H A DHwBlob.java59 public static Boolean[] wrapArray(@NonNull boolean[] array) { argument
60 final int n = array.length;
63 wrappedArray[i] = array[i];
68 public static Long[] wrapArray(@NonNull long[] array) { argument
69 final int n = array.length;
72 wrappedArray[i] = array[i];
77 public static Byte[] wrapArray(@NonNull byte[] array) { argument
78 final int n = array.length;
81 wrappedArray[i] = array[i];
86 public static Short[] wrapArray(@NonNull short[] array) { argument
95 wrapArray(@onNull int[] array) argument
104 wrapArray(@onNull float[] array) argument
113 wrapArray(@onNull double[] array) argument
[all...]
H A DHwParcel.java70 boolean[] array = new boolean[n];
72 array[i] = val.get(i);
75 writeBoolVector(array);
80 byte[] array = new byte[n];
82 array[i] = val.get(i);
85 writeInt8Vector(array);
90 short[] array = new short[n];
92 array[i] = val.get(i);
95 writeInt16Vector(array);
100 int[] array
[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/support/tv-provider/src/android/support/media/tv/
H A DCollectionUtils.java31 * Returns an array with the arrays concatenated together.
38 for (T[] array : rest) {
39 totalLength += array.length;
43 for (T[] array : rest) {
44 System.arraycopy(array, 0, result, offset, array.length);
45 offset += array.length;
/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/compat/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.h35 struct array { struct in namespace:com::android::appaslib::lib
53 struct array { struct in namespace:com::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...]

Completed in 4224 milliseconds

1234567891011>>