org.openware.job.util
Class MultiHashMap
java.lang.Object
|
+--org.openware.job.util.MultiHashMap
- All Implemented Interfaces:
- java.io.Serializable
- public class MultiHashMap
- extends java.lang.Object
- implements java.io.Serializable
A hashmap that allows duplicate keys.
- Author:
- Vincent Sheffer
- See Also:
- Serialized Form
Method Summary |
java.util.LinkedList |
get(java.lang.Object key)
Get a list of values for the given key. |
static void |
main(java.lang.String[] args)
|
boolean |
put(java.lang.Object key,
java.lang.Object value)
Add a value to the map. |
java.util.LinkedList |
remove(java.lang.Object key)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiHashMap
public MultiHashMap()
put
public boolean put(java.lang.Object key,
java.lang.Object value)
- Add a value to the map.
- Parameters:
key
- The hash key for the value.value
- The value to put in the map.- Returns:
true
if the key is a duplicate,
false
otherwise.
get
public java.util.LinkedList get(java.lang.Object key)
- Get a list of values for the given key.
- Parameters:
key
- The key to find the values for.- Returns:
- A
LinkedList
of values. null
if the key is not present.
remove
public java.util.LinkedList remove(java.lang.Object key)
main
public static void main(java.lang.String[] args)
Copyright © 2000,2001 Openware. All Rights Reserved.