Top Description Fields Constructors Methods
org.pcollections

public final Class HashTreePMap

extends Object
Class Inheritance
Imports
java.util.Map, .Map.Entry

A static convenience class for creating efficient persistent maps.

This class simply creates HashPMaps backed by IntTreePMaps.

Author
harold

Field Summary

Modifier and TypeField and Description
private static final HashPMap<Object, Object>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <K, V> HashPMap<K, V>

Returns:

an empty map
empty
()

public static <K, V> HashPMap<K, V>

Returns:

empty().plusAll(map)
from
(final Map<? extends K, ? extends V> map)

public static <K, V> HashPMap<K, V>

Returns:

empty().plus(key, value)
singleton
(final K key, final V value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTYback to summary
private static final HashPMap<Object, Object> EMPTY

Constructor Detail

HashTreePMapback to summary
private HashTreePMap()

Method Detail

emptyback to summary
public static <K, V> HashPMap<K, V> empty()
Returns:HashPMap<K, V>

an empty map

Annotations
@SuppressWarnings:unchecked
fromback to summary
public static <K, V> HashPMap<K, V> from(final Map<? extends K, ? extends V> map)
Returns:HashPMap<K, V>

empty().plusAll(map)

singletonback to summary
public static <K, V> HashPMap<K, V> singleton(final K key, final V value)
Returns:HashPMap<K, V>

empty().plus(key, value)