V - public final class IntTreePMap<V>
extends java.util.AbstractMap<java.lang.Integer,V>
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.
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(java.lang.Object key) |
static <V> IntTreePMap<V> |
empty() |
java.util.Set<java.util.Map.Entry<java.lang.Integer,V>> |
entrySet() |
static <V> IntTreePMap<V> |
from(java.util.Map<? extends java.lang.Integer,? extends V> map) |
V |
get(java.lang.Object key) |
IntTreePMap<V> |
minus(java.lang.Object key) |
IntTreePMap<V> |
minusAll(java.util.Collection<?> keys) |
IntTreePMap<V> |
plus(java.lang.Integer key,
V value) |
IntTreePMap<V> |
plusAll(java.util.Map<? extends java.lang.Integer,? extends V> map) |
static <V> IntTreePMap<V> |
singleton(java.lang.Integer key,
V value) |
int |
size() |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, toString, valuespublic static <V> IntTreePMap<V> empty()
V - public static <V> IntTreePMap<V> singleton(java.lang.Integer key, V value)
V - key - value - public static <V> IntTreePMap<V> from(java.util.Map<? extends java.lang.Integer,? extends V> map)
V - map - public java.util.Set<java.util.Map.Entry<java.lang.Integer,V>> entrySet()
public int size()
public boolean containsKey(java.lang.Object key)
public V get(java.lang.Object key)
public IntTreePMap<V> plus(java.lang.Integer key, V value)
public IntTreePMap<V> minus(java.lang.Object key)
public IntTreePMap<V> plusAll(java.util.Map<? extends java.lang.Integer,? extends V> map)
public IntTreePMap<V> minusAll(java.util.Collection<?> keys)
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.