|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap
org.exolab.castor.util.OrderedHashMap
public class OrderedHashMap
A very simple extended HashMap, which maintains order via an ArrayList. This class provides similar, though not identical, functionality as the JDK's LinkedHashMap, but works under JDK 1.2 and JDK 1.3. This class is not synchronized, if more than one thread accesses an instance of this class and at least one thread modifies the map, the OrderedHashMap instance must be synchronized via a call to Collections.synchronizedMap method. The #entrySet() and #keySet() methods return unmodifiable sets. The #values() method returns an unmodifiable collection.
Constructor Summary | |
---|---|
OrderedHashMap()
Creates a new OrderedHashMap |
|
OrderedHashMap(int initialCapacity)
Creates a new OrderedHashMap with the given initial capacity |
|
OrderedHashMap(java.util.Map m)
Creates a new OrderedHashMap with the same entries as the given map. |
Method Summary | |
---|---|
void |
clear()
|
java.lang.Object |
clone()
|
java.util.Set |
entrySet()
Returns the Map.Entry set for this Map. |
java.util.Set |
keySet()
Returns the key set for this Map. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
putAll(java.util.Map m)
|
java.lang.Object |
remove(java.lang.Object key)
|
java.util.Collection |
values()
Returns the set of values for this Map. |
Methods inherited from class java.util.HashMap |
---|
containsKey, containsValue, get, isEmpty, size |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public OrderedHashMap()
public OrderedHashMap(int initialCapacity)
initialCapacity
- public OrderedHashMap(java.util.Map m)
m
- the Map to initialize this Map withMethod Detail |
---|
public void clear()
clear
in interface java.util.Map
clear
in class java.util.HashMap
public java.lang.Object clone()
clone
in class java.util.HashMap
public java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in class java.util.HashMap
Map.entrySet()
public java.util.Set keySet()
keySet
in interface java.util.Map
keySet
in class java.util.HashMap
Map.keySet()
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
put
in interface java.util.Map
put
in class java.util.HashMap
public void putAll(java.util.Map m)
putAll
in interface java.util.Map
putAll
in class java.util.HashMap
public java.lang.Object remove(java.lang.Object key)
remove
in interface java.util.Map
remove
in class java.util.HashMap
public java.util.Collection values()
values
in interface java.util.Map
values
in class java.util.HashMap
Map.values()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |