Package soot.util
Class LargeNumberedMap<K extends Numberable,V>
- java.lang.Object
-
- soot.util.LargeNumberedMap<K,V>
-
- All Implemented Interfaces:
INumberedMap<K,V>
public final class LargeNumberedMap<K extends Numberable,V> extends Object implements INumberedMap<K,V>
A java.util.Map with Numberable objects as the keys. This one is designed for maps close to the size of the universe. For smaller maps, use SmallNumberedMap.- Author:
- Ondrej Lhotak
-
-
Constructor Summary
Constructors Constructor Description LargeNumberedMap(IterableNumberer<K> universe)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget(K key)Returns the value associated with a given key.Iterator<K>keyIterator()Returns an iterator over the keys with non-null values.booleanput(K key, V value)Associates a value with a key.voidremove(K key)Removes the given key from the map
-
-
-
Constructor Detail
-
LargeNumberedMap
public LargeNumberedMap(IterableNumberer<K> universe)
-
-
Method Detail
-
put
public boolean put(K key, V value)
Description copied from interface:INumberedMapAssociates a value with a key.- Specified by:
putin interfaceINumberedMap<K extends Numberable,V>- Parameters:
key- The keyvalue- The value- Returns:
- True if the association was new, false if the same value was already associated with the given key before
-
get
public V get(K key)
Description copied from interface:INumberedMapReturns the value associated with a given key.- Specified by:
getin interfaceINumberedMap<K extends Numberable,V>- Parameters:
key- The key- Returns:
- The value associated with the given key
-
remove
public void remove(K key)
Description copied from interface:INumberedMapRemoves the given key from the map- Specified by:
removein interfaceINumberedMap<K extends Numberable,V>- Parameters:
key- The key to be removed
-
keyIterator
public Iterator<K> keyIterator()
Description copied from interface:INumberedMapReturns an iterator over the keys with non-null values.- Specified by:
keyIteratorin interfaceINumberedMap<K extends Numberable,V>- Returns:
- The iterator
-
-