|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.util.leap.HashMap
public class HashMap
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.
HashMap,
Serialized Form| Constructor Summary | |
|---|---|
HashMap()
Default constructor, creates a new empty Map |
|
HashMap(int s)
Constructor, creates a new Map with initial size |
|
HashMap(int s,
float lf)
Constructor, creates a new Map with initial size and load factor |
|
| Method Summary | |
|---|---|
void |
clear()
Remove all mappings from this map. |
boolean |
containsKey(java.lang.Object key)
Returns true if this map contains a mapping for the specified key. |
java.lang.Object |
get(java.lang.Object key)
Returns the value to which this map maps the specified key. |
boolean |
isEmpty()
Returns true if this map contains no key-value mappings. |
Set |
keySet()
Returns a set view of the keys contained in this map. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Associates the specified value with the specified key in this map (optional operation). |
java.lang.Object |
remove(java.lang.Object o)
Removes the mapping for this key from this map if present (optional operation). |
int |
size()
Returns the number of mappings in this map. |
java.lang.String |
toString()
|
Collection |
values()
Returns a Collection view of the values contained in this map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HashMap()
public HashMap(int s)
public HashMap(int s,
float lf)
| Method Detail |
|---|
public boolean isEmpty()
Map
isEmpty in interface Mapinterfacepublic java.lang.Object remove(java.lang.Object o)
Map
remove in interface Mapo - key whose mapping is to be removed from the map.
interface
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
Map
put in interface Mapkey - key with which the specified value is to be associated.value - value to be associated with the specified key.
interfacepublic java.lang.Object get(java.lang.Object key)
Map
get in interface Mapkey - key whose associated value is to be returned.
interfacepublic int size()
Map
size in interface Mapinterfacepublic boolean containsKey(java.lang.Object key)
Map
containsKey in interface Mapkey - key whose presence in this map is to be tested.
interfacepublic void clear()
Map
clear in interface Mapinterfacepublic java.lang.String toString()
toString in class java.lang.Objectpublic Set keySet()
Map
keySet in interface Mapinterfacepublic Collection values()
Map
values in interface Mapinterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||