A marker for a node in an encoded graph. The reason to encode graphs is usually to reduce the
memory footprint, because encoded graphs are much smaller than non-encoded graphs. But the
encoding/decoding cycle does not preserve the identity of node objects: all nodes are newly
allocated during decoding, and keeping a single node of a graph alive would keep the whole
graph alive. So it is not possible to keep a direct reference to a node in an encoded graph.
This class serves as a marker instead: All markers passed into
GraphEncoder.encode(StructuredGraph, Iterable) and
GraphDecoder.decode(EncodedGraph, Iterable) are properly updated, so that after
decoding the
EncodedGraph.EncodedNodeReference.getNode() method returns the new node of the just decoded graph.