@Test public void testContainsKey(){ Assert.assertFalse(shortMap.containsKey((short) 0)); Assert.assertFalse(shortMap.containsKey((short) 34)); Assert.assertFalse(shortMap.containsKey((short) 123)); Assert.assertFalse(shortMap.containsKey((short) 200)); testAdd(); Assert.assertTrue(shortMap.containsKey((short) 0)); Assert.assertTrue(shortMap.containsKey((short) 34)); Assert.assertTrue(shortMap.containsKey((short) 123)); Assert.assertFalse(shortMap.containsKey((short) 200)); shortMap.clear(); Assert.assertFalse(shortMap.containsKey((short) 0)); Assert.assertFalse(shortMap.containsKey((short) 34)); Assert.assertFalse(shortMap.containsKey((short) 123)); Assert.assertFalse(shortMap.containsKey((short) 200)); }
public boolean containsKey (short key) { if (key == 0) return hasZeroValue; int index = (int)(key & mask); if (keyTable[index] != key) { index = hash2(key); if (keyTable[index] != key) { index = hash3(key); if (keyTable[index] != key) return containsKeyStash(key); } } return true; }
ShortMap implements Iterable<ShortMap.Entry<V>> { public boolean containsKey (short key) { if (key == 0) return hasZeroValue; int index = (int)(key & mask); if (keyTable[index] != key) { index = hash2(key); if (keyTable[index] != key) { index = hash3(key); if (keyTable[index] != key) return containsKeyStash(key); } } return true; } }
ShortMap implements Iterable<ShortMap.Entry<V>> { public boolean containsKey (short key) { if (key == 0) return hasZeroValue; int index = (int)(key & mask); if (keyTable[index] != key) { index = hash2(key); if (keyTable[index] != key) { index = hash3(key); if (keyTable[index] != key) return containsKeyStash(key); } } return true; } ShortMap();  ShortMap(int initialCapacity);  ShortMap(int initialCapacity, float loadFactor);  ShortMap(ShortMap<? extends V> map); }
ShortMap implements Iterable<ShortMap.Entry<V>> { public boolean containsKey (short key) { if (key == 0) return hasZeroValue; int index = (int)(key & mask); if (keyTable[index] != key) { index = hash2(key); if (keyTable[index] != key) { index = hash3(key); if (keyTable[index] != key) return containsKeyStash(key); } } return true; } ShortMap();  ShortMap(int initialCapacity);  ShortMap(int initialCapacity, float loadFactor);  ShortMap(ShortMap<? extends V> map); V put(short key, V value); void putAll(ShortMap<V> map); V get(short key); V get(short key, V defaultValue); V remove(short key); void shrink(int maximumCapacity); void clear(int maximumCapacity); void clear(); boolean containsValue(Object value, boolean identity); boolean containsKey(short key); short findKey(Object value, boolean identity, short notFound); void ensureCapacity(int additionalCapacity); int hashCode(); boolean equals(Object obj); String toString(); Iterator<Entry<V>> iterator(); Entries<V> entries(); Values<V> values(); Keys keys(); }
ShortMap implements Iterable<ShortMap.Entry<V>> { public boolean containsKey (short key) { if (key == 0) return hasZeroValue; int index = (int)(key & mask); if (keyTable[index] != key) { index = hash2(key); if (keyTable[index] != key) { index = hash3(key); if (keyTable[index] != key) return containsKeyStash(key); } } return true; } ShortMap();  ShortMap(int initialCapacity);  ShortMap(int initialCapacity, float loadFactor);  ShortMap(ShortMap<? extends V> map); V put(short key, V value); void putAll(ShortMap<V> map); V get(short key); V get(short key, V defaultValue); V remove(short key); void shrink(int maximumCapacity); void clear(int maximumCapacity); void clear(); boolean containsValue(Object value, boolean identity); boolean containsKey(short key); short findKey(Object value, boolean identity, short notFound); void ensureCapacity(int additionalCapacity); int hashCode(); boolean equals(Object obj); String toString(); Iterator<Entry<V>> iterator(); Entries<V> entries(); Values<V> values(); Keys keys(); public int size; }