Class GraphAdapterBuilder.Graph

java.lang.Object
com.google.gson.graph.GraphAdapterBuilder.Graph
Enclosing class:
GraphAdapterBuilder

static class GraphAdapterBuilder.Graph extends Object
  • Field Details

    • map

      private final Map<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 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 Details

  • Method Details

    • nextName

      public String nextName()
      Returns a unique name for an element to be inserted into the graph.