@Test public void testSize() { CompactHashMap<String,Integer> map = new CompactHashMap<String,Integer>(TRANSLATOR); map.checkStructure(); assertEquals(0, map.size()); map.put("xy", 32); assertEquals(1, map.size()); map.put("xyz", 27); assertEquals(2, map.size()); assertEquals((Integer)32, map.put("xy", 5)); assertEquals(2, map.size()); map.put("a", 0); map.put("b", 1); map.put("c", -1); assertEquals(5, map.size()); map.checkStructure(); }
public int size() { return size; }
CompactHashMap extends AbstractMap<K,V> { public int size() { return size; } }
CompactHashMap extends AbstractMap<K,V> { public int size() { return size; } CompactHashMap(CompactMapTranslator<K,V> trans); }
CompactHashMap extends AbstractMap<K,V> { public int size() { return size; } CompactHashMap(CompactMapTranslator<K,V> trans); void clear(); int size(); @SuppressWarnings("unchecked") boolean containsKey(Object key); V get(Object key); V put(K key, V value); V remove(Object key); Set<Map.Entry<K,V>> entrySet(); }
CompactHashMap extends AbstractMap<K,V> { public int size() { return size; } CompactHashMap(CompactMapTranslator<K,V> trans); void clear(); int size(); @SuppressWarnings("unchecked") boolean containsKey(Object key); V get(Object key); V put(K key, V value); V remove(Object key); Set<Map.Entry<K,V>> entrySet();  }