K - the key type of content of this MapV - the value type of content of this Mappublic class ImmutableHashMap<K,V> extends ImmutableAbstractMap<K,V>
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Modifier | Constructor and Description |
|---|---|
|
ImmutableHashMap(ImmutableHashMap<K,V> immutableMap) |
|
ImmutableHashMap(ImmutableHashMap<K,V> immutableMap,
Immutable copyOrWrap) |
|
ImmutableHashMap(Map<K,V> map) |
protected |
ImmutableHashMap(Map<K,V> map,
boolean copy) |
|
ImmutableHashMap(Map<K,V> map,
Immutable copyOrWrap) |
| Modifier and Type | Method and Description |
|---|---|
protected HashMap<K,V> |
getMap()
Prepare the map of the right type for use a subclass.
|
ImmutableSet<K> |
keySet()
Returns a
Set view of the keys contained in this map. |
Map<K,V> |
toMap()
Returns a modifiable copy of this immutable list.
|
String |
toString() |
containsKey, containsValue, equals, get, hashCode, isEmpty, isWrap, size, valuesclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, getOrDefault, isCopypublic ImmutableHashMap(Map<K,V> map)
map - the map to use as the immutable map.public ImmutableHashMap(Map<K,V> map, Immutable copyOrWrap)
map - the map to use as the immutable map.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collectionprotected ImmutableHashMap(Map<K,V> map, boolean copy)
map - the map to use as the immutable map.copy - boolean; indicates whether the immutable is a copy or a wrappublic ImmutableHashMap(ImmutableHashMap<K,V> immutableMap)
immutableMap - the map to use as the immutable map.public ImmutableHashMap(ImmutableHashMap<K,V> immutableMap, Immutable copyOrWrap)
immutableMap - the map to use as the immutable map.copyOrWrap - COPY stores a safe, internal copy of the collection; WRAP stores a pointer to the original collectionprotected final HashMap<K,V> getMap()
@Override
protected HashMap<E> getMap()
{
return (HashMap<E>) super.getMap();
}
getMap in class ImmutableAbstractMap<K,V>public final Map<K,V> toMap()
public final ImmutableSet<K> keySet()
Set view of the keys contained in this map.public String toString()
toString in class ImmutableAbstractMap<K,V>Copyright © 2014–2016 Delft University of Technology. All rights reserved.