Package org.jjazz.utilities.api
Class SmallMap<K,V>
java.lang.Object
org.jjazz.utilities.api.SmallMap<K,V>
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
Serializable
A silly but fast map for small maps, based on simple ArrayLists and iterative search.
- See Also:
-
Constructor Details
-
SmallMap
public SmallMap()Create an empty SillyMap. -
SmallMap
Create a SillyMap initialized with a single key/value pair.- Parameters:
key
-value
-
-
-
Method Details
-
clear
public void clear() -
clone
- Returns:
- A shallow copy of this map.
-
getKeys
-
getValues
-
putValue
Store value associated to key, replacing existing value if key already present in the map.- Parameters:
key
-value
-
-
remove
-
getValue
- Parameters:
key
- K- Returns:
- V Null if not found.
-
getKey
- Parameters:
value
- V- Returns:
- K Null if not found
-
isEmpty
public boolean isEmpty() -
size
public int size() -
toString
-