Package jade.util.leap
Class HashMap
- java.lang.Object
-
- jade.util.leap.HashMap
-
- All Implemented Interfaces:
Map,Serializable,Serializable
- Direct Known Subclasses:
DataStore
public class HashMap extends Object implements Map, Serializable
The LEAP (environment-dependent) version of the &qote;java.util.HashMap&qote; class. This class appears to be exactly the same in J2SE, PJAVA and MIDP. The internal implementation is different in the three cases however.- Version:
- 1.0, 29/09/00
- Author:
- Nicolas Lhuillier
- See Also:
HashMap, Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Remove all mappings from this map.booleancontainsKey(Object key)Returns true if this map contains a mapping for the specified key.Objectget(Object key)Returns the value to which this map maps the specified key.booleanisEmpty()Returns true if this map contains no key-value mappings.SetkeySet()Returns a set view of the keys contained in this map.Objectput(Object key, Object value)Associates the specified value with the specified key in this map (optional operation).Objectremove(Object o)Removes the mapping for this key from this map if present (optional operation).intsize()Returns the number of mappings in this map.StringtoString()Collectionvalues()Returns a Collection view of the values contained in this map.
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Description copied from interface:MapReturns true if this map contains no key-value mappings.
-
remove
public Object remove(Object o)
Description copied from interface:MapRemoves the mapping for this key from this map if present (optional operation).
-
put
public Object put(Object key, Object value)
Description copied from interface:MapAssociates the specified value with the specified key in this map (optional operation).
-
get
public Object get(Object key)
Description copied from interface:MapReturns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key.
-
size
public int size()
Description copied from interface:MapReturns the number of mappings in this map.
-
containsKey
public boolean containsKey(Object key)
Description copied from interface:MapReturns true if this map contains a mapping for the specified key.- Specified by:
containsKeyin interfaceMap- Parameters:
key- key whose presence in this map is to be tested.- Returns:
- true if this map contains a mapping for the specified key.
- See Also:
interface
-
clear
public void clear()
Description copied from interface:MapRemove all mappings from this map.
-
keySet
public Set keySet()
Description copied from interface:MapReturns a set view of the keys contained in this map.
-
values
public Collection values()
Description copied from interface:MapReturns a Collection view of the values contained in this map.
-
-