@Test public void defaultToOmega() { chartis = new DefaultHashMap<>(OMEGA); fortioCharti(); assertEquals("missing 1", ALPHA, chartis.get(ONE)); assertEquals("missing 2", BETA, chartis.get(TWO)); assertEquals("three?", OMEGA, chartis.get(THREE)); assertEquals("four?", OMEGA, chartis.get(FOUR)); }
@Override public V get(Object k) { return containsKey(k) ? super.get(k) : defaultValue; }
DefaultHashMap extends HashMap<K, V> { @Override public V get(Object k) { return containsKey(k) ? super.get(k) : defaultValue; } }
DefaultHashMap extends HashMap<K, V> { @Override public V get(Object k) { return containsKey(k) ? super.get(k) : defaultValue; } DefaultHashMap(V defaultValue); }
DefaultHashMap extends HashMap<K, V> { @Override public V get(Object k) { return containsKey(k) ? super.get(k) : defaultValue; } DefaultHashMap(V defaultValue); @Override V get(Object k); }
DefaultHashMap extends HashMap<K, V> { @Override public V get(Object k) { return containsKey(k) ? super.get(k) : defaultValue; } DefaultHashMap(V defaultValue); @Override V get(Object k);  }