org.pcollections
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.
- Author:
- harold
Method Summary |
static
|
empty()
|
static
|
from(Map<? extends K,? extends V> map)
|
static
|
singleton(K key,
V value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
Copyright © 2011. All Rights Reserved.