A simple HashMap with collision management written in Java.
HashMap<String, Integer> map = new HashMap<>();
map.put(null, 0);
map.put("key", 1987);
if ( map.hasElement("key") ) {
Integer value = map.get("key");
}
- Just drag & drop HashMap.java into your project.
- That's all!
Some JUnit tests are available here
HashMap is available under the MIT license. See the LICENSE file for more info.
Follow me on twitter @capezzbr