OpenIntToDoubleHashMap implements Serializable { public boolean containsKey(final int key) { final int hash = hashOf(key); int index = hash & mask; if (containsKey(key, index)) { return true; } if (states[index] == FREE) { return false; } int j = index; for (int perturb = perturb(hash); states[index] != FREE; perturb >>= PERTURB_SHIFT) { j = probe(perturb, j); index = j & mask; if (containsKey(key, index)) { return true; } } return false; } OpenIntToDoubleHashMap();  OpenIntToDoubleHashMap(final double missingEntries);  OpenIntToDoubleHashMap(final int expectedSize);  OpenIntToDoubleHashMap(final int expectedSize,
                                  final double missingEntries);  OpenIntToDoubleHashMap(final OpenIntToDoubleHashMap source); double get(final int key); boolean containsKey(final int key); Iterator iterator(); int size(); double remove(final int key); double put(final int key, final double value);  }
@Test public void testContainsKey() { OpenIntToDoubleHashMap map = createFromJavaMap(); for (Map.Entry<Integer, Double> mapEntry : javaMap.entrySet()) { Assert.assertTrue(map.containsKey(mapEntry.getKey())); } for (Map.Entry<Integer, Double> mapEntry : generateAbsent().entrySet()) { Assert.assertFalse(map.containsKey(mapEntry.getKey())); } for (Map.Entry<Integer, Double> mapEntry : javaMap.entrySet()) { int key = mapEntry.getKey(); Assert.assertTrue(map.containsKey(key)); map.remove(key); Assert.assertFalse(map.containsKey(key)); } }