@Test public void testContainsKey(){ Assert.assertFalse(byteMap.containsKey((byte) 0)); Assert.assertFalse(byteMap.containsKey((byte) 34)); Assert.assertFalse(byteMap.containsKey((byte) 123)); Assert.assertFalse(byteMap.containsKey((byte) 127)); testAdd(); Assert.assertTrue(byteMap.containsKey((byte) 0)); Assert.assertTrue(byteMap.containsKey((byte) 34)); Assert.assertTrue(byteMap.containsKey((byte) 123)); Assert.assertFalse(byteMap.containsKey((byte) 127)); byteMap.clear(); Assert.assertFalse(byteMap.containsKey((byte) 0)); Assert.assertFalse(byteMap.containsKey((byte) 34)); Assert.assertFalse(byteMap.containsKey((byte) 123)); Assert.assertFalse(byteMap.containsKey((byte) 127)); }
public boolean containsKey (byte 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; }
ByteMap implements Iterable<ByteMap.Entry<V>> { public boolean containsKey (byte 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; } }
ByteMap implements Iterable<ByteMap.Entry<V>> { public boolean containsKey (byte 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; } ByteMap();  ByteMap(int initialCapacity);  ByteMap(int initialCapacity, float loadFactor);  ByteMap(ByteMap<? extends V> map); }
ByteMap implements Iterable<ByteMap.Entry<V>> { public boolean containsKey (byte 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; } ByteMap();  ByteMap(int initialCapacity);  ByteMap(int initialCapacity, float loadFactor);  ByteMap(ByteMap<? extends V> map); V put(byte key, V value); void putAll(ByteMap<V> map); V get(byte key); V get(byte key, V defaultValue); V remove(byte key); void shrink(int maximumCapacity); void clear(int maximumCapacity); void clear(); boolean containsValue(Object value, boolean identity); boolean containsKey(byte key); byte findKey(Object value, boolean identity, byte 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(); }
ByteMap implements Iterable<ByteMap.Entry<V>> { public boolean containsKey (byte 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; } ByteMap();  ByteMap(int initialCapacity);  ByteMap(int initialCapacity, float loadFactor);  ByteMap(ByteMap<? extends V> map); V put(byte key, V value); void putAll(ByteMap<V> map); V get(byte key); V get(byte key, V defaultValue); V remove(byte key); void shrink(int maximumCapacity); void clear(int maximumCapacity); void clear(); boolean containsValue(Object value, boolean identity); boolean containsKey(byte key); byte findKey(Object value, boolean identity, byte 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; }