Interface PMap<K,​V>

  • 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.

    • 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>
    • 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.
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
    • 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
      • put

        @Deprecated
        V put​(K k,
              V v)
        Deprecated.
        Specified by:
        put in interface java.util.Map<K,​V>
      • remove

        @Deprecated
        V remove​(java.lang.Object k)
        Deprecated.
        Specified by:
        remove in interface java.util.Map<K,​V>
      • putAll

        @Deprecated
        void putAll​(java.util.Map<? extends K,​? extends V> m)
        Deprecated.
        Specified by:
        putAll in interface java.util.Map<K,​V>
      • clear

        @Deprecated
        void clear()
        Deprecated.
        Specified by:
        clear in interface java.util.Map<K,​V>