Package org.organicdesign.fp.collections
Interface MutMap<K,V>
-
- All Superinterfaces:
BaseMap<K,V>
,BaseUnsortedMap<K,V>
,Iterable<UnmodMap.UnEntry<K,V>>
,Map<K,V>
,Sized
,Transformable<UnmodMap.UnEntry<K,V>>
,UnmodIterable<UnmodMap.UnEntry<K,V>>
,UnmodMap<K,V>
- All Known Implementing Classes:
PersistentHashMap.MutHashMap
public interface MutMap<K,V> extends BaseUnsortedMap<K,V>
Interface for mutable (hash) map builder.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,V extends Object>
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodIterable
UnmodIterable.UnIterable
-
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 @NotNull MutMap<K,V>
assoc(Map.Entry<K,V> entry)
Returns a new map with an immutable copy of the given entry added@NotNull MutMap<K,V>
assoc(K key, V val)
Returns a new map with the given key/value addeddefault @NotNull MutSet<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 @NotNull MutSet<K>
keySet()
Returns a mutable view of the keys contained in this map.@NotNull MutMap<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 java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
any, toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutList, toMutMap, toMutRrbt, toMutSet, toMutSortedMap, toMutSortedSet
-
Methods inherited from interface org.organicdesign.fp.collections.UnmodIterable
concat, drop, dropWhile, filter, flatMap, fold, foldUntil, head, iterator, map, precat, take, takeWhile, whereNonNull
-
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
@NotNull @NotNull MutMap<K,V> assoc(K key, V val)
Returns a new map with the given key/value added
-
assoc
@NotNull default @NotNull MutMap<K,V> assoc(@NotNull Map.Entry<K,V> entry)
Returns a new map with an immutable copy of the given entry added
-
entrySet
@NotNull default @NotNull MutSet<Map.Entry<K,V>> entrySet()
Description copied from interface:BaseMap
Returns 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
@NotNull default @NotNull MutSet<K> keySet()
Returns a mutable view of the keys contained in this map.
-
-