public V setValue(V value) { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.SETVALUE_INVALID); } return current.setValue(value); } }
/** * Gets an iterator over the map. * Changes made to the iterator affect this map. * <p/> * A MapIterator returns the keys in the map. It also provides convenient * methods to get the key and value, and set the value. * It avoids the need to create an entrySet/keySet/values object. * It also avoids creating the Map.Entry object. * * @return the map iterator */ public MapIterator<K, V> mapIterator() { if (size == 0) { return EmptyMapIterator.INSTANCE; } return new HashMapIterator<K, V>(this); }
/** * Gets an iterator over the map. * Changes made to the iterator affect this map. * <p/> * A MapIterator returns the keys in the map. It also provides convenient * methods to get the key and value, and set the value. * It avoids the need to create an entrySet/keySet/values object. * It also avoids creating the Map.Entry object. * * @return the map iterator */ public MapIterator<K, V> mapIterator() { if (size == 0) { return EmptyMapIterator.INSTANCE; } return new HashMapIterator<K, V>(this); }
/** * Gets an iterator over the map. * Changes made to the iterator affect this map. * <p/> * A MapIterator returns the keys in the map. It also provides convenient * methods to get the key and value, and set the value. * It avoids the need to create an entrySet/keySet/values object. * It also avoids creating the Map.Entry object. * * @return the map iterator */ public MapIterator<K, V> mapIterator() { if (size == 0) { return EmptyMapIterator.INSTANCE; } return new HashMapIterator<K, V>(this); }
public V getValue() { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.GETVALUE_INVALID); } return current.getValue(); }
public K getKey() { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.GETKEY_INVALID); } return current.getKey(); }
public K getKey() { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.GETKEY_INVALID); } return current.getKey(); }
public V setValue(V value) { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.SETVALUE_INVALID); } return current.setValue(value); } }
public K getKey() { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.GETKEY_INVALID); } return current.getKey(); }
public V setValue(V value) { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.SETVALUE_INVALID); } return current.setValue(value); } }
public V getValue() { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.GETVALUE_INVALID); } return current.getValue(); }
public V getValue() { HashEntry<K, V> current = currentEntry(); if (current == null) { throw new IllegalStateException(AbstractHashedMap.GETVALUE_INVALID); } return current.getValue(); }