/** * Check whether a key exists in the array. * * @param key The key to search for. * @return Returns true if the key exists, else false. */ public boolean containsKey(Object key) { return indexOfKey(key) >= 0; }
/** * Retrieve a value from the array. * @param key The key of the value to retrieve. * @return Returns the value associated with the given key, * or null if there is no such key. */ public V get(Object key) { final int index = indexOfKey(key); return index >= 0 ? (V)mArray[(index<<1)+1] : null; }
/** * Remove an existing key from the array map. * @param key The key of the mapping to remove. * @return Returns the value that was stored under the key, or null if there * was no such key. */ public V remove(Object key) { final int index = indexOfKey(key); if (index >= 0) { return removeAt(index); } return null; }
/** * Check whether a key exists in the array. * * @param key The key to search for. * @return Returns true if the key exists, else false. */ public boolean containsKey(Object key) { return indexOfKey(key) >= 0; }
/** * Retrieve a value from the array. * @param key The key of the value to retrieve. * @return Returns the value associated with the given key, * or null if there is no such key. */ public V get(Object key) { final int index = indexOfKey(key); return index >= 0 ? (V)mArray[(index<<1)+1] : null; }
/** * Check whether a key exists in the array. * * @param key The key to search for. * @return Returns true if the key exists, else false. */ public boolean containsKey(Object key) { return indexOfKey(key) >= 0; }
/** * Retrieve a value from the array. * @param key The key of the value to retrieve. * @return Returns the value associated with the given key, * or null if there is no such key. */ public V get(Object key) { final int index = indexOfKey(key); return index >= 0 ? (V)mArray[(index<<1)+1] : null; }
/** * Remove an existing key from the array map. * @param key The key of the mapping to remove. * @return Returns the value that was stored under the key, or null if there * was no such key. */ public V remove(Object key) { final int index = indexOfKey(key); if (index >= 0) { return removeAt(index); } return null; }
/** * Remove an existing key from the array map. * @param key The key of the mapping to remove. * @return Returns the value that was stored under the key, or null if there * was no such key. */ public V remove(Object key) { final int index = indexOfKey(key); if (index >= 0) { return removeAt(index); } return null; }