Package jade.util.leap
Interface Map
-
public interface MapThe LEAP (environment-dependent) version of the &qote;java.util.Map&qote; interface. This interface appears to be exactly the same in J2SE, PJAVA and MIDP. The internal implementation is different in the three cases however.- Version:
- 1.0, 23/10/00
- Author:
- Nicolas Lhuillier
- See Also:
(J2SE)
-
-
Method Summary
All Methods Instance Methods Abstract 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 key)Removes the mapping for this key from this map if present (optional operation).intsize()Returns the number of mappings in this map.Collectionvalues()Returns a Collection view of the values contained in this map.
-
-
-
Method Detail
-
isEmpty
boolean isEmpty()
Returns true if this map contains no key-value mappings.- Returns:
- true if this map contains no key-value mappings.
- See Also:
Map
-
remove
Object remove(Object key)
Removes the mapping for this key from this map if present (optional operation).- Parameters:
key- key whose mapping is to be removed from the map.- Returns:
- previous value associated with specified key, or null if there was no mapping for key.
- See Also:
Map
-
keySet
Set keySet()
Returns a set view of the keys contained in this map.- Returns:
- a set view of the keys contained in this map.
- See Also:
Map
-
values
Collection values()
Returns a Collection view of the values contained in this map.- Returns:
- the Collection of elements contained in this map.
- See Also:
Map
-
put
Object put(Object key, Object value)
Associates the specified value with the specified key in this map (optional operation).- Parameters:
key- key with which the specified value is to be associated.value- value to be associated with the specified key.- Returns:
- previous value associated with specified key, or null if there was no mapping for key.
- See Also:
Map
-
containsKey
boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.- 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:
Map
-
get
Object get(Object key)
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key.- Parameters:
key- key whose associated value is to be returned.- Returns:
- the value to which this map maps the specified key, or null if the map contains no mapping for this key.
- See Also:
Map
-
size
int size()
Returns the number of mappings in this map.- See Also:
Map
-
clear
void clear()
Remove all mappings from this map.- See Also:
Map
-
-