Package com.thoughtworks.qdox.model.util
Class OrderedMap
- java.lang.Object
-
- java.util.AbstractMap
-
- com.thoughtworks.qdox.model.util.OrderedMap
-
- All Implemented Interfaces:
java.util.Map
public class OrderedMap extends java.util.AbstractMap
This is a simple Map implementation backed by a List of Map.Entry objects. It has the property that iterators return entries in the order in whick they were inserted. Operations involving searching, including get() and put(), have cost linear to the size of the map. In other words, avoid this implementation if your Map might get large. If we could assume Java 1.4+, we'd just use java.util.LinkedHashMap instead of this class. But we can't.- Author:
- Mike Williams
-
-
Constructor Summary
Constructors Constructor Description OrderedMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set
entrySet()
java.lang.Object
put(java.lang.Object key, java.lang.Object value)
-
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
-
-
-
-
Method Detail
-
entrySet
public java.util.Set entrySet()
- Specified by:
entrySet
in interfacejava.util.Map
- Specified by:
entrySet
in classjava.util.AbstractMap
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
- Specified by:
put
in interfacejava.util.Map
- Overrides:
put
in classjava.util.AbstractMap
-
-