Class IntTreePMap<V>

Type Parameters:
V -
All Implemented Interfaces:
Serializable, Map<Integer,V>, PMap<Integer,V>

public final class IntTreePMap<V> extends AbstractUnmodifiableMap<Integer,V> implements PMap<Integer,V>, Serializable
An efficient persistent map from integer keys to values. Null values are supported.

Iteration occurs in the integer order of the keys.

This implementation is thread-safe (assuming Java's AbstractMap and AbstractSet are thread-safe), although its iterators may not be.

The balanced tree is based on the Glasgow Haskell Compiler's Data.Map implementation, which in turn is based on "size balanced binary trees" as described by:

Stephen Adams, "Efficient sets: a balancing act", Journal of Functional Programming 3(4):553-562, October 1993, http://www.swiss.ai.mit.edu/~adams/BB/.

J. Nievergelt and E.M. Reingold, "Binary search trees of bounded balance", SIAM journal of computing 2(1), March 1973.

See Also: