com.arsdigita.bebop.util
Class SequentialMap
java.lang.Object
java.util.AbstractMap
com.arsdigita.util.SequentialMap
com.arsdigita.bebop.util.SequentialMap
- All Implemented Interfaces:
- Map
- public class SequentialMap
- extends SequentialMap
A map that keeps its entries in a fixed sequence. All iterators returned
by this class, for example by entrySet().iterator()
, are
guaranteed to return the entries in the order in which they were put in
the map. This implementation allows null
for both the key
or the associated value for a map entry.
Almost all of the map operations, for example get
or containsKey
require time linear in the size of the map,
making this map only suitable for small map sizes.
- Version:
- $Id: //core-platform/dev/src/com/arsdigita/bebop/util/SequentialMap.java#7 $
- Author:
- David Lutterkort
Constructor Summary |
SequentialMap()
Creates an empty SequentialMap . |
Method Summary |
int |
findKey(Object key)
Find an entry with the given key. |
Methods inherited from class com.arsdigita.util.SequentialMap |
clear, containsKey, containsValue, entrySet, get, get, getKey, indexOf, put, remove, size, update |
versionId
public static final String versionId
- See Also:
- Constant Field Values
SequentialMap
public SequentialMap()
- Creates an empty
SequentialMap
.
findKey
public int findKey(Object key)
- Find an entry with the given key.
key
may be null.
Requires time linear in the size of the map
- Parameters:
key
- the key to find
- Returns:
- the index with key
key or -1 if no such entry
exists.
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC