-
- Type Parameters:
K
-V
-
- All Superinterfaces:
java.util.Map<K,V>
- All Known Subinterfaces:
PSortedMap<K,V>
- All Known Implementing Classes:
HashPMap
,IntTreePMap
,OrderedPMap
,TreePMap
public interface PMap<K,V> extends java.util.Map<K,V>
An immutable, persistent map from keys of type K to values of type V.Some implementations may not support null keys and/or values, in which case they will throw
NullPointerException
for attempts to add such keys/values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.PMap<K,V>
minus(java.lang.Object key)
PMap<K,V>
minusAll(java.util.Collection<?> keys)
PMap<K,V>
plus(K key, V value)
PMap<K,V>
plusAll(java.util.Map<? extends K,? extends V> map)
V
put(K k, V v)
Deprecated.void
putAll(java.util.Map<? extends K,? extends V> m)
Deprecated.V
remove(java.lang.Object k)
Deprecated.
-
-
-
Method Detail
-
plus
PMap<K,V> plus(K key, V value)
- Parameters:
key
-value
-- Returns:
- a map with the mappings of this but with key mapped to value
-
plusAll
PMap<K,V> plusAll(java.util.Map<? extends K,? extends V> map)
- Parameters:
map
-- Returns:
- this combined with map, with map's mappings used for any keys in both map and this
-
minus
PMap<K,V> minus(java.lang.Object key)
- Parameters:
key
-- Returns:
- a map with the mappings of this but with no value for key
-
minusAll
PMap<K,V> minusAll(java.util.Collection<?> keys)
- Parameters:
keys
-- Returns:
- a map with the mappings of this but with no value for any element of keys
-
remove
@Deprecated V remove(java.lang.Object k)
Deprecated.
-
-