@Test public void entrySetRetainAllReflectedInMapAndOtherViews() { HugeHashMap<Integer, String> map = getViewTestMap(3); Set<Map.Entry<Integer, String>> entrySet = map.entrySet(); Set<Integer> keySet = map.keySet(); Collection<String> values = map.values(); entrySet.retainAll( Arrays.asList( new AbstractMap.SimpleEntry<Integer, String>(1, "1"), new AbstractMap.SimpleEntry<Integer, String>(2, "2") ) ); assertMap(map, new int[]{2, 1}, new String[]{"2", "1"}); assertEntrySet(entrySet, new int[]{2, 1}, new String[]{"2", "1"}); assertKeySet(keySet, new int[]{2, 1}); assertValues(values, new String[]{"2", "1"}); }
@NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); }
HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } }
HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap();  HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); }
HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap();  HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V get(Object key); @Override V get(K key, V value); @Override V remove(Object key); @Override boolean containsKey(Object key); @NotNull @Override Set<Entry<K, V>> entrySet(); @Override V putIfAbsent(@NotNull K key, V value); @Override boolean remove(@NotNull Object key, Object value); @Override boolean replace(@NotNull K key, @NotNull V oldValue, @NotNull V newValue); @Override V replace(@NotNull K key, @NotNull V value); @Override boolean isEmpty(); @Override int size(); @Override long offHeapUsed(); @Override void clear(); }
HugeHashMap extends AbstractMap<K, V> implements HugeMap<K, V> { @NotNull @Override public Set<Entry<K, V>> entrySet() { return (entrySet != null) ? entrySet : (entrySet = new EntrySet()); } HugeHashMap();  HugeHashMap(HugeConfig config, Class<K> kClass, Class<V> vClass); @Override V put(K key, V value); @Override V get(Object key); @Override V get(K key, V value); @Override V remove(Object key); @Override boolean containsKey(Object key); @NotNull @Override Set<Entry<K, V>> entrySet(); @Override V putIfAbsent(@NotNull K key, V value); @Override boolean remove(@NotNull Object key, Object value); @Override boolean replace(@NotNull K key, @NotNull V oldValue, @NotNull V newValue); @Override V replace(@NotNull K key, @NotNull V value); @Override boolean isEmpty(); @Override int size(); @Override long offHeapUsed(); @Override void clear();  }