- java.lang.Object
-
- com.google.gson.graph.GraphAdapterBuilder.Graph
-
- Enclosing class:
- GraphAdapterBuilder
static class GraphAdapterBuilder.Graph extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.Object,GraphAdapterBuilder.Element<?>>
map
The graph elements.private GraphAdapterBuilder.Element
nextCreate
The instance currently being deserialized.private java.util.Queue<GraphAdapterBuilder.Element>
queue
The queue of elements to write during serialization.
-
Constructor Summary
Constructors Modifier Constructor Description private
Graph(java.util.Map<java.lang.Object,GraphAdapterBuilder.Element<?>> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
nextName()
Returns a unique name for an element to be inserted into the graph.
-
-
-
Field Detail
-
map
private final java.util.Map<java.lang.Object,GraphAdapterBuilder.Element<?>> map
The graph elements. On serialization keys are objects (using an identity hash map) and on deserialization keys are the string names (using a standard hash map).
-
queue
private final java.util.Queue<GraphAdapterBuilder.Element> queue
The queue of elements to write during serialization. Unused during deserialization.
-
nextCreate
private GraphAdapterBuilder.Element nextCreate
The instance currently being deserialized. Used as a backdoor between the graph traversal (which needs to know instances) and instance creators which create them.
-
-
Constructor Detail
-
Graph
private Graph(java.util.Map<java.lang.Object,GraphAdapterBuilder.Element<?>> map)
-
-