Package soot.util
Class SmallNumberedMap<K extends Numberable,V>
- java.lang.Object
-
- soot.util.SmallNumberedMap<K,V>
-
- All Implemented Interfaces:
INumberedMap<K,V>
public final class SmallNumberedMap<K extends Numberable,V> extends Object implements INumberedMap<K,V>
A java.util.Map with Numberable objects as the keys.- Author:
- Ondrej Lhotak
-
-
Constructor Summary
Constructors Constructor Description SmallNumberedMap()
-
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<V>iterator()Returns an iterator over the non-null values.Iterator<K>keyIterator()Returns an iterator over the keys with non-null values.intnonNullSize()Returns the number of non-null values in this map.booleanput(K key, V value)Associates a value with a key.voidremove(K key)Removes the given key from the map
-
-
-
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
-
nonNullSize
public int nonNullSize()
Returns the number of non-null values in this map.
-
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
-
-