A class which allows an {@link InMemoryNodeModel} to associate arbitraryobjects with nodes.
Some special configuration implementations need additional data to be stored with their nodes structure. We call such data "references" because objects required by a configuration are referenced. In such constellations, it is necessary to keep track about the nodes associated with references even if they are replaced by others during an update operation of the model. This is the task of this class.
Basically, an instance manages a map associating nodes with reference objects. When a node is replaced the map gets updated. References becoming orphans because the nodes pointing to them were removed are tracked, too. They may be of importance for special configuration implementations as they might require additional updates. A concrete use case for this class is {@code XMLConfiguration} which stores the DOM nodes represented byconfiguration nodes as references.
Implementation note: This class is intended to work in a concurrent environment. Instances are immutable. The represented state can be updated by creating new instances which are then stored by the owning node model.
@version $Id: ReferenceTracker.java 1624601 2014-09-12 18:04:36Z oheger $