Package org.djutils.immutablecollections
Class ImmutableHashMap<K,V> 
java.lang.Object
org.djutils.immutablecollections.ImmutableAbstractMap<K,V>
 
org.djutils.immutablecollections.ImmutableHashMap<K,V> 
- Type Parameters:
- K- the key type of content of this Map
- V- the value type of content of this Map
- All Implemented Interfaces:
- ImmutableMap<K,- V> 
An immutable wrapper for a HashMap.
 
Copyright (c) 2016-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.
- Author:
- Alexander Verbraeck, Peter Knoppers
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.djutils.immutablecollections.ImmutableMapImmutableMap.ImmutableEntry<K,V> 
- 
Field SummaryFields inherited from class org.djutils.immutablecollections.ImmutableAbstractMapcachedValues, copyOrWrap
- 
Constructor SummaryConstructorsConstructorDescriptionImmutableHashMap(Map<K, V> map) ImmutableHashMap(Map<K, V> map, Immutable copyOrWrap) ImmutableHashMap(ImmutableAbstractMap<K, V> immutableMap) ImmutableHashMap(ImmutableAbstractMap<K, V> immutableMap, Immutable copyOrWrap) 
- 
Method SummaryModifier and TypeMethodDescriptionentrySet()Returns aSetview of the entries contained in this map.Return the raw underlying map.final ImmutableSet<K>keySet()Returns aSetview of the keys contained in this map.toMap()Returns a modifiable copy of this immutable map.toString()Force to redefine toString.Methods inherited from class org.djutils.immutablecollections.ImmutableAbstractMapcontainsKey, containsValue, equals, get, hashCode, isEmpty, isWrap, size, valuesMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djutils.immutablecollections.ImmutableMapforEach, getOrDefault, isCopy
- 
Constructor Details- 
ImmutableHashMap- Parameters:
- map- the map to use for the immutable map.
 
- 
ImmutableHashMap- Parameters:
- map- the map to use for the immutable map.
- copyOrWrap- WRAP stores a pointer to the original collection
 
- 
ImmutableHashMap- Parameters:
- immutableMap- the map to use for the immutable map.
 
- 
ImmutableHashMap- Parameters:
- immutableMap- the map to use for the immutable map.
- copyOrWrap- WRAP stores a pointer to the original collection
 
 
- 
- 
Method Details- 
getUnderlyingMapDescription copied from class:ImmutableAbstractMapReturn the raw underlying map.- Overrides:
- getUnderlyingMapin class- ImmutableAbstractMap<K,- V> 
- Returns:
- the raw underlying map
 
- 
toMapDescription copied from interface:ImmutableMapReturns a modifiable copy of this immutable map.- Returns:
- a modifiable copy of this immutable map.
 
- 
keySetDescription copied from interface:ImmutableMapReturns aSetview of the keys contained in this map.- Returns:
- an immutable set of the keys contained in this map
 
- 
entrySetDescription copied from interface:ImmutableMapReturns aSetview of the entries contained in this map.- Returns:
- an immutable set of the entries contained in this map
 
- 
toStringDescription copied from interface:ImmutableMapForce to redefine toString.
 
-