net.sf.swan.util
Class LightMap
java.lang.Object
|
+--java.util.AbstractMap
|
+--net.sf.swan.util.LightMap
- All Implemented Interfaces:
- java.util.Map
- public final class LightMap
- extends java.util.AbstractMap
Compact, lightweight Map
implementation optimized for small
numbers of entries. It is compact in memory use, and additions and removals
are cheap. However, lookups use a linear search, so this should only be used
for very small numbers of entries.
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Method Summary |
java.util.Set |
entrySet()
|
java.lang.Object |
get(java.lang.Object key)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
java.lang.Object |
remove(java.lang.Object key)
|
Methods inherited from class java.util.AbstractMap |
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, values |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
LightMap
public LightMap()
LightMap
public LightMap(java.util.Map map)
entrySet
public java.util.Set entrySet()
- Overrides:
entrySet
in class java.util.AbstractMap
get
public java.lang.Object get(java.lang.Object key)
- Overrides:
get
in class java.util.AbstractMap
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Overrides:
put
in class java.util.AbstractMap
remove
public java.lang.Object remove(java.lang.Object key)
- Overrides:
remove
in class java.util.AbstractMap