/** * Add entries to a map. * * @param map the map to add to * @param entries the entries to add * @param <K> the key type * @param <V> the value type * @return the map */ public static <K, V> Map<K, V> addTo(Map<K, V> map, MapEntry<? extends K, ? extends V>... entries) { for (MapEntry<? extends K, ? extends V> pair : entries) { map.put(pair.getKey(), pair.getValue()); } return map; } }
/** * Add entries to a map. * * @param map the map to add to * @param entries the entries to add * @param <K> the key type * @param <V> the value type * @return the map */ public static <K, V> Map<K, V> addTo(Map<K, V> map, MapEntry<? extends K, ? extends V>... entries) { for (MapEntry<? extends K, ? extends V> pair : entries) { map.put(pair.getKey(), pair.getValue()); } return map; } }
/** {@inheritDoc} */ public Map<K, V> getValue() throws IllegalStateException { final List<MapEntry<? extends Value<? extends K>, ? extends Value<? extends V>>> values = this.values; final Map<K, V> map = mapValue.getValue(); for (MapEntry<? extends Value<? extends K>, ? extends Value<? extends V>> pair : values) { map.put(pair.getKey().getValue(), pair.getValue().getValue()); } return map; } }
/** {@inheritDoc} */ public Map<K, V> getValue() throws IllegalStateException { final List<MapEntry<? extends Value<? extends K>, ? extends Value<? extends V>>> values = this.values; final Map<K, V> map = mapValue.getValue(); for (MapEntry<? extends Value<? extends K>, ? extends Value<? extends V>> pair : values) { map.put(pair.getKey().getValue(), pair.getValue().getValue()); } return map; } }
/** {@inheritDoc} */ public MapEntry<K, V> getValue() throws IllegalStateException { final MapEntry<Value<K>, Value<V>> entry = this.entry; return MapEntry.entry(entry.getKey().getValue(), entry.getValue().getValue()); }
/** {@inheritDoc} */ public MapEntry<K, V> getValue() throws IllegalStateException { final MapEntry<Value<K>, Value<V>> entry = this.entry; return MapEntry.entry(entry.getKey().getValue(), entry.getValue().getValue()); }