Module org.pcollections
Package org.pcollections
package org.pcollections
A persistent and immutable analogue of the Java Collections API.
All of the provided implementations are thread-safe (although their iterators may not be) but this is not required by the interfaces.
The classes and interfaces in this package are related as follows.
Note the importance of IntTreePMap, which provides the backing for every
provided implementation except ConsPStack:
-
ClassDescriptionA subclass of AbstractCollection that overrides the various mutator methods to mark them as deprecated and unconditionally throw UnsupportedOperationException.A subclass of AbstractList that overrides the various mutator methods to mark them as deprecated and unconditionally throw UnsupportedOperationException.A subclass of AbstractMap that overrides the various mutator methods to mark them as deprecated and unconditionally throw UnsupportedOperationException.A subclass of AbstractQueue that overrides the various mutator methods to mark them as deprecated and unconditionally throw UnsupportedOperationException.A subclass of AbstractSequentialList that overrides the various mutator methods to mark them as deprecated and unconditionally throw UnsupportedOperationException.A subclass of AbstractSet that overrides the various mutator methods to mark them as deprecated and unconditionally throw UnsupportedOperationException.ConsPStack<E>A simple persistent stack.A static utility class for getting empty PCollections backed by the 'default' implementations.HashPMap<K,
V> A persistent map from keys to values.A static convenience class for creating efficient persistent bags.A static convenience class for creating efficient persistent maps.A static convenience class for creating efficient persistent sets.IntTree<V>A non-public utility class for persistent balanced tree maps with integer keys.IntTreePMap<V>An efficient persistent map from integer keys to values.KVTree<K,V> A persistent (immutable, purely functional) balanced-binary-tree implementation, with such functionality as is needed to support implementations ofPSortedMap
andPSortedSet
, namelyTreePMap
andTreePSet
.KVTree.EntryIterator<K,V> An iterator over the mappings of a KVTree.Whether an iterator returns entries or just keys.MapPBag<E>A map-backed persistent bag.MapPSet<E>A map-backed persistent set.OrderedPMap<K,V> LikePMap
but preserves insertion order.OrderedPSet<E>LikePSet
but preserves insertion order.PBag<E>An unordered collection allowing duplicate elements.PCollection<E>An immutable, persistent collection of elements of type E.PMap<K,V> An immutable, persistent map from keys of type K to values of type V.PQueue<E>A persistent queue.PSequence<E>An immutable, persistent indexed collection.PSet<E>An immutable, persistent set, containing no duplicate elements.PSortedMap<K,V> An immutable, persistent map from keys of type K to values of type V, with keys arranged in sorted order (according to someComparator
), and with various methods to obtain specific mappings or ranges of mappings based on this ordering (such as the least key greater than some instance of type K, or the sub-map with keys between two instances of type K).PSortedSet<E>An immutable, persistent set of distinct elements, with elements arranged in sorted order (according to someComparator
), and with various methods to obtain specific elements or ranges of elements based on this ordering (such as the least element greater than some value, or the set of elements between two values).PStack<E>An immutable, persistent stack.PVector<E>An immutable, persistent list.TreePMap<K,V> An implementation ofPSortedMap
based on a self-balancing binary search tree.TreePSet<E>An implementation ofPSortedSet
based on a self-balancing binary search tree.TreePVector<E>A persistent vector of elements.