This map uses a given integer map to map hashcodes to lists of elements with the same hashcode. Thus if all elements have the same hashcode, performance is reduced to that of an association list.
This implementation is thread-safe (assuming Java's AbstractMap and AbstractSet are thread-safe), although its iterators may not be.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private transient Set | |
| private final PMap | |
| private static final long | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | containsKey(final Object
key whose presence in this map is to be tested key)Overrides java. Implements java. Returns |
| public static <K, V> HashPMap | |
| public Set | entrySet()
Implements abstract java. Implements java. Returns a |
| public V | get(final Object
the key whose associated value is to be returned key)Overrides java. Implements java. Returns the value to which the specified key is mapped,
or |
| private PSequence | |
| private static <K, V> int | |
| public HashPMap | |
| public HashPMap | |
| public HashPMap | |
| public HashPMap | |
| public int | size()
Overrides java. Implements java. Returns the number of key-value mappings in this map. |
| entrySet | back to summary |
|---|---|
| private transient Set<Map. | |
| intMap | back to summary |
|---|---|
| private final PMap<Integer, PSequence<Map. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| size | back to summary |
|---|---|
| private final int size | |
| HashPMap | back to summary |
|---|---|
| private HashPMap(final PMap<Integer, PSequence<Map. | |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(final Object key) Overrides java. Implements java. Doc from java. Returns | |
| empty | back to summary |
|---|---|
public static <K, V> HashPMap
| |
| entrySet | back to summary |
|---|---|
| public Set Implements abstract java. Implements java. Doc from java. Returns a | |
| get | back to summary |
|---|---|
| public V get(final Object key) Overrides java. Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| getEntries | back to summary |
|---|---|
| private PSequence | |
| keyIndexIn | back to summary |
|---|---|
| private static <K, V> int keyIndexIn(final PSequence<Map. | |
| minus | back to summary |
|---|---|
| public HashPMap Implements org.
| |
| minusAll | back to summary |
|---|---|
| public HashPMap Implements org.
| |
| plus | back to summary |
|---|---|
| public HashPMap Implements org.
| |
| plusAll | back to summary |
|---|---|
| public HashPMap Implements org.
| |
| size | back to summary |
|---|---|
| public int size() Overrides java. Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Iterator | |
| private PSequence |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public E | |
| public void | remove()
Overrides default java. Removes from the underlying collection the last element returned by this iterator (optional operation). |
| i | back to summary |
|---|---|
| private final Iterator<PSequence<E>> i | |
| seq | back to summary |
|---|---|
| private PSequence<E> seq | |
| SequenceIterator | back to summary |
|---|---|
| pack-priv SequenceIterator(Iterator<PSequence<E>> i) | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public E next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the | |