soot.util
Class DeterministicHashMap
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--soot.util.DeterministicHashMap
- public class DeterministicHashMap
- extends java.util.HashMap
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
Constructor Summary |
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 |
java.util.Collection |
entries()
Returns a backed list of entries for this HashMap (unsupported). |
java.util.Set |
keySet()
Returns a backed list of keys for this HashMap (unsupported). |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Inserts a mapping in this HashMap from key to value . |
java.lang.Object |
remove(java.lang.Object obj)
Removes the given object from this HashMap (unsupported). |
Methods inherited from class java.util.HashMap |
clear,
clone,
containsKey,
containsValue,
entrySet,
get,
isEmpty,
putAll,
size,
values |
Methods inherited from class java.util.AbstractMap |
equals,
hashCode,
toString |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
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.
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Inserts a mapping in this HashMap from
key
to value
.
- Overrides:
- put in class java.util.HashMap
entries
public java.util.Collection entries()
- Returns a backed list of entries for this HashMap (unsupported).
remove
public java.lang.Object remove(java.lang.Object obj)
- Removes the given object from this HashMap (unsupported).
- Overrides:
- remove in class java.util.HashMap
keySet
public java.util.Set keySet()
- Returns a backed list of keys for this HashMap (unsupported).
- Overrides:
- keySet in class java.util.HashMap