Lines Matching full:value
128 * Adds a mapping from the specified key to the specified value, replacing
131 public void put(long key, E value) {
135 mValues[i] = value;
141 mValues[i] = value;
173 mValues[i] = value;
179 * Returns the number of key-value mappings that this SparseArray currently
192 * from the <code>index</code>th key-value mapping that this SparseArray
204 * Given an index in the range <code>0...size()-1</code>, returns the value
205 * from the <code>index</code>th key-value mapping that this SparseArray
218 * Given an index in the range <code>0...size()-1</code>, sets a new value
219 * for the <code>index</code>th key-value mapping that this SparseArray
222 public void setValueAt(int index, E value) {
227 mValues[index] = value;
244 * key, or a negative number if no keys map to the specified value. Beware
246 * keys can map to the same value and this will find only one of them.
248 public int indexOfValue(E value) {
254 if (mValues[i] == value)
261 * Removes all key-value mappings from this SparseArray.
276 * Puts a key/value pair into the array, optimizing for the case where the
279 public void append(long key, E value) {
281 put(key, value);
305 mValues[pos] = value;
442 * Checks that value is present as at least one of the elements of the
447 * @param value
448 * the value to check for
449 * @return true if the value is present in the array
451 public static <T> boolean contains(T[] array, T value) {
454 if (value == null)
457 if (value != null && element.equals(value))