Lines Matching defs:array

31  * 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
59 * Maximum number of entries to have in array caches.
64 * Caches of small array objects to avoid spamming garbage. The cache
65 * Object[] variable is a pointer to a linked list of array objects.
66 * The first entry in the array is a pointer to the next array in the
67 * list; the second entry is a pointer to the int[] hash code array for it.
112 // hash chain to reduce the number of array entries that will
150 // hash chain to reduce the number of array entries that will
159 final Object[] array = mTwiceBaseCache;
160 mArray = array;
161 mTwiceBaseCache = (Object[])array[0];
162 mHashes = (int[])array[1];
163 array[0] = array[1] = null;
173 final Object[] array = mBaseCache;
174 mArray = array;
175 mBaseCache = (Object[])array[0];
176 mHashes = (int[])array[1];
177 array[0] = array[1] = null;
190 private static void freeArrays(final int[] hashes, final Object[] array, final int size) {
194 array[0] = mTwiceBaseCache;
195 array[1] = hashes;
197 array[i] = null;
199 mTwiceBaseCache = array;
201 if (DEBUG) Log.d(TAG, "Storing 2x cache " + array
208 array[0] = mBaseCache;
209 array[1] = hashes;
211 array[i] = null;
213 mBaseCache = array;
215 if (DEBUG) Log.d(TAG, "Storing 1x cache " + array
223 * Create a new empty ArraySet. The default capacity of an array map is 0, and
264 * Make the array map empty. All storage is released.
277 * Ensure the array map can hold at least <var>minimumCapacity</var>
315 * Return the value at the given index in the array.
324 * Return true if the array map contains no items.
389 * Perform a {@link #add(Object)} of all values in <var>array</var>
390 * @param array The array whose contents are to be retrieved.
392 public void addAll(ArraySet<? extends E> array) {
393 final int N = array.mSize;
397 System.arraycopy(array.mHashes, 0, mHashes, 0, N);
398 System.arraycopy(array.mArray, 0, mArray, 0, N);
403 add(array.valueAt(i));
478 * Return the number of items in this array map.
493 public <T> T[] toArray(T[] array) {
494 if (array.length < mSize) {
496 = (T[]) Array.newInstance(array.getClass().getComponentType(), mSize);
497 array = newArray;
499 System.arraycopy(mArray, 0, array, 0, mSize);
500 if (array.length > mSize) {
501 array[mSize] = null;
503 return array;