|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.Util.DataStructs.LightMap
LightMap
is a very lightweight implementation of
the java.util.Map
interface.
Nested Class Summary |
Nested classes inherited from class java.util.Map |
Map.Entry |
Constructor Summary | |
LightMap()
Creates a LightMap . |
|
LightMap(Map m)
Creates a LightMap with the same mappings as the
given map. |
Method Summary | |
void |
clear()
Removes all mappings from this map. |
Object |
clone()
|
boolean |
containsKey(Object key)
Returns true if this map contains a mapping
for the specified key. |
boolean |
containsValue(Object value)
Unsupported yet. |
Set |
entrySet()
Returns the set of entries of this map. |
boolean |
equals(Object o)
|
Object |
get(Object key)
Returns the value to which this map maps the specified key. |
int |
hashCode()
|
boolean |
isEmpty()
|
Set |
keySet()
Returns a set view of the keys contained in this map. |
Object |
put(Object key,
Object value)
Associates the specified value with the specified key in this map. |
void |
putAll(Map map)
Copies all of the mappings from the specified map to this map. |
Object |
remove(Object key)
Removes the mapping previously attached to key . |
int |
size()
|
String |
toString()
|
Collection |
values()
Returns a collection view of the values contained in this map. |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LightMap()
LightMap
.
public LightMap(Map m)
LightMap
with the same mappings as the
given map.
Method Detail |
public final int size()
size
in interface Map
public final boolean isEmpty()
isEmpty
in interface Map
public final boolean containsKey(Object key)
true
if this map contains a mapping
for the specified key.
containsKey
in interface Map
public final boolean containsValue(Object value)
containsValue
in interface Map
public final Object get(Object key)
get
in interface Map
public final Object put(Object key, Object value)
put
in interface Map
public final Object remove(Object key)
key
.
Returns the old mapping if any, or null
otherwise.
remove
in interface Map
public final void putAll(Map map) throws UnsupportedOperationException
putAll
in interface Map
UnsupportedOperationException
public final void clear() throws UnsupportedOperationException
clear
in interface Map
UnsupportedOperationException
public final Collection values()
values
in interface Map
public final Set entrySet() throws UnsupportedOperationException
Set
of Map.Entry
.
entrySet
in interface Map
UnsupportedOperationException
public final Set keySet()
java.util
maps, this set is NOT backed by the map
(eg removing a key from the returned set has no effect on
the map).
keySet
in interface Map
public Object clone()
clone
in class Object
public boolean equals(Object o)
equals
in interface Map
equals
in class Object
public int hashCode()
hashCode
in interface Map
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |