Andrew McDonough

Please note: This page is imported from my wiki, which hasn't been updated in over 10 years. Some of the formatting was lost during the import. I'll try to get around to fixing it someday.

HashMap

http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html|HashMap is a hash based implementation of the Map interface.

Constructors

HashMap = new Hashmap(); HashMap = new Hashmap(int initial Capacity); …

Userful functions

^returns^method^description^ |void|clear() | remove all mappings| |Object|get(Object key)|retrieves the value| |Object|put(Object key, Object value)|adds a key,value pair| |int|size()|The number of entries| |Set|keySet()|The set of keys| |Collection|values()|the values contained|

\ \ See http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashMap.html for all.


Andrew McDonough

Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.

Follow Andrew on Twitter or Connect on LinkedIn