Class ObjectIdDictionary
- java.lang.Object
-
- com.thoughtworks.xstream.core.util.ObjectIdDictionary
-
public class ObjectIdDictionary extends java.lang.Object
Store IDs against given object references.Behaves similar to java.util.IdentityHashMap, but in JDK1.3 as well. Additionally the implementation keeps track of orphaned IDs by using a WeakReference to store the reference object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ObjectIdDictionary.IdWrapper
private class
ObjectIdDictionary.WeakIdWrapper
private static interface
ObjectIdDictionary.Wrapper
-
Constructor Summary
Constructors Constructor Description ObjectIdDictionary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
associateId(java.lang.Object obj, java.lang.Object id)
private void
cleanup()
boolean
containsId(java.lang.Object item)
java.lang.Object
lookupId(java.lang.Object obj)
void
removeId(java.lang.Object item)
int
size()
-
-
-
Method Detail
-
associateId
public void associateId(java.lang.Object obj, java.lang.Object id)
-
lookupId
public java.lang.Object lookupId(java.lang.Object obj)
-
containsId
public boolean containsId(java.lang.Object item)
-
removeId
public void removeId(java.lang.Object item)
-
size
public int size()
-
cleanup
private void cleanup()
-
-