|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
java.util.HashMap
org.exolab.castor.util.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 |
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()
public java.lang.Object clone()
public java.util.Set entrySet()
Map.entrySet()
public java.util.Set keySet()
Map.keySet()
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
public void putAll(java.util.Map m)
public java.lang.Object remove(java.lang.Object key)
public java.util.Collection values()
Map.values()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |