@Test public void testContainsValue() { Map<String, Integer> instance = new FastValueAccessMap<>(); instance.put("v0", 0); instance.put("v1", 1); instance.remove("v1"); instance.put("v2", 2); instance.put("v2_bis", 2); instance.put("v3", 3); instance.put("v3_bis", 3); instance.remove("v3"); instance.put("v4", 4); instance.put("v4_bis", 4); instance.remove("v4"); instance.remove("v4_bis"); instance.remove("v5"); assertThat(instance.containsValue(null)).isFalse(); assertThat(instance.containsValue(0)).isTrue(); assertThat(instance.containsValue(1)).isFalse(); assertThat(instance.containsValue(2)).isTrue(); assertThat(instance.containsValue(3)).isTrue(); assertThat(instance.containsValue(4)).isFalse(); assertThat(instance.containsValue(5)).isFalse(); }
@Override public boolean containsValue(Object v) { return valuesReferenceCounter.containsKey(wrapNullValue(v)); }
FastValueAccessMap implements Map<K, V> { @Override public boolean containsValue(Object v) { return valuesReferenceCounter.containsKey(wrapNullValue(v)); } }
FastValueAccessMap implements Map<K, V> { @Override public boolean containsValue(Object v) { return valuesReferenceCounter.containsKey(wrapNullValue(v)); }  }
FastValueAccessMap implements Map<K, V> { @Override public boolean containsValue(Object v) { return valuesReferenceCounter.containsKey(wrapNullValue(v)); }  @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object o); @Override boolean containsValue(Object v); @Override V get(Object o); @Override V put(K k, V v); @Override V remove(Object k); @Override void putAll(Map<? extends K, ? extends V> map); @Override void clear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Entry<K, V>> entrySet(); }
FastValueAccessMap implements Map<K, V> { @Override public boolean containsValue(Object v) { return valuesReferenceCounter.containsKey(wrapNullValue(v)); }  @Override int size(); @Override boolean isEmpty(); @Override boolean containsKey(Object o); @Override boolean containsValue(Object v); @Override V get(Object o); @Override V put(K k, V v); @Override V remove(Object k); @Override void putAll(Map<? extends K, ? extends V> map); @Override void clear(); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Entry<K, V>> entrySet();  }