Package soot.util
Class DeterministicHashMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- soot.util.DeterministicHashMap<K,V>
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<K,V>
public class DeterministicHashMap<K,V> extends HashMap<K,V>
Implementation of HashMap which guarantees a stable (between executions) order for its elements upon iteration. This is quite useful for maps of Locals, to avoid nondeterministic local-name drift.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description DeterministicHashMap(int initialCapacity)Constructs a DeterministicHashMap with the given initial capacity.DeterministicHashMap(int initialCapacity, float loadFactor)Constructs a DeterministicHashMap with the given initial capacity and load factor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<K>keySet()Returns a backed list of keys for this HashMap (unsupported).Vput(K key, V value)Inserts a mapping in this HashMap fromkeytovalue.Vremove(Object obj)Removes the given object from this HashMap (unsupported).-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
DeterministicHashMap
public DeterministicHashMap(int initialCapacity)
Constructs a DeterministicHashMap with the given initial capacity.
-
DeterministicHashMap
public DeterministicHashMap(int initialCapacity, float loadFactor)Constructs a DeterministicHashMap with the given initial capacity and load factor.
-
-