com.thoughtworks.qdox.model.util

Class OrderedMap


public class OrderedMap
extends 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

Nested Class Summary

(package private) static class
OrderedMap.Entry
(package private) static class
OrderedMap.OrderedSet

Field Summary

private Set
_entrySet

Method Summary

Set
entrySet()
private static boolean
eq(Object o1, Object o2)
private OrderedMap.Entry
getEntryWithKey(Object key)
Object
put(Object key, Object value)

Field Details

_entrySet

private Set _entrySet

Method Details

entrySet

public Set entrySet()

eq

private static boolean eq(Object o1,
                          Object o2)

getEntryWithKey

private OrderedMap.Entry getEntryWithKey(Object key)

put

public Object put(Object key,
                  Object value)