@Test public void testEntrySet() { for (int i = 0; i < 10; ++i) { map.put("hello" + i, "world" + i); } Set<Map.Entry<String, String>> entries = map.entrySet(); int i = 0; for (Map.Entry<String, String> entry : entries) { assertEquals("hello" + i, entry.getKey()); assertEquals("world" + i++, entry.getValue()); } }
public Set<Map.Entry<K, V>> entrySet() { Set<Map.Entry<K, V>> es = entrySet; return (es != null ? es : (entrySet = (Set<Map.Entry<K, V>>) new EntrySet())); }
SortedHashMap extends AbstractMap<K, V> { public Set<Map.Entry<K, V>> entrySet() { Set<Map.Entry<K, V>> es = entrySet; return (es != null ? es : (entrySet = (Set<Map.Entry<K, V>>) new EntrySet())); } }
SortedHashMap extends AbstractMap<K, V> { public Set<Map.Entry<K, V>> entrySet() { Set<Map.Entry<K, V>> es = entrySet; return (es != null ? es : (entrySet = (Set<Map.Entry<K, V>>) new EntrySet())); } SortedHashMap();  SortedHashMap(int initialCapacity);  SortedHashMap(int initialCapacity, OrderingType orderingType);  SortedHashMap(int initialCapacity, float loadFactor, OrderingType orderingType); }
SortedHashMap extends AbstractMap<K, V> { public Set<Map.Entry<K, V>> entrySet() { Set<Map.Entry<K, V>> es = entrySet; return (es != null ? es : (entrySet = (Set<Map.Entry<K, V>>) new EntrySet())); } SortedHashMap();  SortedHashMap(int initialCapacity);  SortedHashMap(int initialCapacity, OrderingType orderingType);  SortedHashMap(int initialCapacity, float loadFactor, OrderingType orderingType); V put(K key, V value); static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType); static void moveToTop(SortedHashMap linkedMap, Object key); static OrderingType getOrderingTypeByName(String orderingType); boolean containsKey(Object key); V get(Object key); void clear(); V remove(Object key); boolean containsValue(Object value); Set<K> keySet(); Collection<V> values(); Set<Map.Entry<K, V>> entrySet(); }
SortedHashMap extends AbstractMap<K, V> { public Set<Map.Entry<K, V>> entrySet() { Set<Map.Entry<K, V>> es = entrySet; return (es != null ? es : (entrySet = (Set<Map.Entry<K, V>>) new EntrySet())); } SortedHashMap();  SortedHashMap(int initialCapacity);  SortedHashMap(int initialCapacity, OrderingType orderingType);  SortedHashMap(int initialCapacity, float loadFactor, OrderingType orderingType); V put(K key, V value); static void touch(SortedHashMap linkedMap, Object key, OrderingType orderingType); static void moveToTop(SortedHashMap linkedMap, Object key); static OrderingType getOrderingTypeByName(String orderingType); boolean containsKey(Object key); V get(Object key); void clear(); V remove(Object key); boolean containsValue(Object value); Set<K> keySet(); Collection<V> values(); Set<Map.Entry<K, V>> entrySet();  }