Class HashTreePMap

java.lang.Object
org.pcollections.HashTreePMap

public final class HashTreePMap extends Object
A static convenience class for creating efficient persistent maps.

This class simply creates HashPMaps backed by IntTreePMaps.

  • Field Details

  • Constructor Details

    • HashTreePMap

      private HashTreePMap()
  • Method Details

    • empty

      public static <K, V> HashPMap<K,V> empty()
      Type Parameters:
      K -
      V -
      Returns:
      an empty map
    • singleton

      public static <K, V> HashPMap<K,V> singleton(K key, V value)
      Type Parameters:
      K -
      V -
      Parameters:
      key -
      value -
      Returns:
      empty().plus(key, value)
    • from

      public static <K, V> HashPMap<K,V> from(Map<? extends K,? extends V> map)
      Type Parameters:
      K -
      V -
      Parameters:
      map -
      Returns:
      empty().plusAll(map)