Package org.organicdesign.fp.collections
Interface MutableMap<K,V>
-
- All Superinterfaces:
BaseMap<K,V>,BaseUnsortedMap<K,V>,java.lang.Iterable<UnmodMap.UnEntry<K,V>>,java.util.Map<K,V>,Sized,Transformable<UnmodMap.UnEntry<K,V>>,UnmodIterable<UnmodMap.UnEntry<K,V>>,UnmodMap<K,V>
- All Known Implementing Classes:
PersistentHashMap.MutableHashMap
public interface MutableMap<K,V> extends BaseUnsortedMap<K,V>
Interface for mutable (hash) map builder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K extends java.lang.Object,V extends java.lang.Object>
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodMap
UnmodMap.UnEntry<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MutableMap<K,V>assoc(java.util.Map.Entry<K,V> entry)Returns a new map with an immutable copy of the given entry addedMutableMap<K,V>assoc(K key, V val)Returns a new map with the given key/value addeddefault MutableSet<java.util.Map.Entry<K,V>>entrySet()Returns a view of the mappings contained in this map.ImMap<K,V>immutable()Returns an immutable version of this mutable map.default MutableSet<K>keySet()Returns a mutable view of the keys contained in this map.MutableMap<K,V>without(K key)Returns a new map with the given key/value removed-
Methods inherited from interface org.organicdesign.fp.collections.BaseMap
containsKey, entry, get, getOrElse
-
Methods inherited from interface org.organicdesign.fp.collections.BaseUnsortedMap
equator
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSet
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodIterable
concat, drop, dropWhile, filter, flatMap, fold, foldUntil, head, iterator, map, precat, take, takeWhile
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodMap
clear, compute, computeIfAbsent, computeIfPresent, containsValue, isEmpty, keyIterator, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, valIterator, values
-
-
-
-
Method Detail
-
assoc
MutableMap<K,V> assoc(K key, V val)
Returns a new map with the given key/value added
-
assoc
default MutableMap<K,V> assoc(java.util.Map.Entry<K,V> entry)
Returns a new map with an immutable copy of the given entry added
-
entrySet
default MutableSet<java.util.Map.Entry<K,V>> entrySet()
Description copied from interface:BaseMapReturns a view of the mappings contained in this map. The set should actually contain UnmodMap.Entry items, but that return signature is illegal in Java, so you'll just have to remember.
-
keySet
default MutableSet<K> keySet()
Returns a mutable view of the keys contained in this map.
-
-