@Test public void entrySetToArray() { Object[] arr = map.entrySet().toArray(); assertThat(arr, arrayContainingInAnyOrder( SimpleMapEntry.create(1, 1), SimpleMapEntry.create(4, 16), SimpleMapEntry.create(9, 81))); }
@Override public Set<Map.Entry<K, V>> entrySet() { return new EntrySet(); }
LazyMap implements Map<K, V> { @Override public Set<Map.Entry<K, V>> entrySet() { return new EntrySet(); } }
LazyMap implements Map<K, V> { @Override public Set<Map.Entry<K, V>> entrySet() { return new EntrySet(); } LazyMap(Function<? super K, ? extends V> compute);  LazyMap(Function<? super K, ? extends V> compute, Supplier<Map<K, V>> mapSupplier);  LazyMap(Function<? super K, ? extends V> compute, Collection<? extends K> initialKeys);  LazyMap(Function<? super K, ? extends V> compute, Collection<? extends K> initialKeys, Supplier<Map<K, V>> mapSupplier); }
LazyMap implements Map<K, V> { @Override public Set<Map.Entry<K, V>> entrySet() { return new EntrySet(); } LazyMap(Function<? super K, ? extends V> compute);  LazyMap(Function<? super K, ? extends V> compute, Supplier<Map<K, V>> mapSupplier);  LazyMap(Function<? super K, ? extends V> compute, Collection<? extends K> initialKeys);  LazyMap(Function<? super K, ? extends V> compute, Collection<? extends K> initialKeys, Supplier<Map<K, V>> mapSupplier); @Override boolean isEmpty(); @Override int size(); @Override V get(Object key); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override V remove(Object k); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Map.Entry<K, V>> entrySet(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override void clear(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); }
LazyMap implements Map<K, V> { @Override public Set<Map.Entry<K, V>> entrySet() { return new EntrySet(); } LazyMap(Function<? super K, ? extends V> compute);  LazyMap(Function<? super K, ? extends V> compute, Supplier<Map<K, V>> mapSupplier);  LazyMap(Function<? super K, ? extends V> compute, Collection<? extends K> initialKeys);  LazyMap(Function<? super K, ? extends V> compute, Collection<? extends K> initialKeys, Supplier<Map<K, V>> mapSupplier); @Override boolean isEmpty(); @Override int size(); @Override V get(Object key); @Override V put(K key, V value); @Override void putAll(Map<? extends K, ? extends V> m); @Override V remove(Object k); @Override Set<K> keySet(); @Override Collection<V> values(); @Override Set<Map.Entry<K, V>> entrySet(); @Override boolean containsKey(Object key); @Override boolean containsValue(Object value); @Override void clear(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }