org.apache.tapestry.util
Class ObjectIdentityMap
java.lang.Object
org.apache.tapestry.util.ObjectIdentityMap
public class ObjectIdentityMap
- extends Object
A simple map-like collection, similar to (but more more limited than) JDK
1.4's IdentityHashMap. It is designed for small collections of
objects.
- Since:
- 4.0
- Author:
- Howard Lewis Ship
Method Summary |
Object |
get(Object key)
Returns the object stored for the given key. |
void |
put(Object key,
Object value)
Adds or updates a key in the bag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectIdentityMap
public ObjectIdentityMap()
put
public void put(Object key,
Object value)
- Adds or updates a key in the bag.
- Parameters:
key
- the key to store a value under; an existing value with the key
is discardedvalue
- the value to store
get
public Object get(Object key)
- Returns the object stored for the given key.
- Returns:
- the value, or null if the key is not found
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.