Package com.google.gson.internal
Class LinkedHashTreeMap.AvlIterator<K,V>
- java.lang.Object
-
- com.google.gson.internal.LinkedHashTreeMap.AvlIterator<K,V>
-
- Enclosing class:
- LinkedHashTreeMap<K,V>
static class LinkedHashTreeMap.AvlIterator<K,V> extends java.lang.Object
Walks an AVL tree in iteration order. Once a node has been returned, its left, right and parent links are no longer used. For this reason it is safe to transform these links as you walk a tree.Warning: this iterator is destructive. It clears the parent node of all nodes in the tree. It is an error to make a partial iteration of a tree.
-
-
Field Summary
Fields Modifier and Type Field Description private LinkedHashTreeMap.Node<K,V>
stackTop
This stack is a singly linked list, linked by the 'parent' field.
-
Constructor Summary
Constructors Constructor Description AvlIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LinkedHashTreeMap.Node<K,V>
next()
(package private) void
reset(LinkedHashTreeMap.Node<K,V> root)
-
-
-
Field Detail
-
stackTop
private LinkedHashTreeMap.Node<K,V> stackTop
This stack is a singly linked list, linked by the 'parent' field.
-
-
Method Detail
-
reset
void reset(LinkedHashTreeMap.Node<K,V> root)
-
next
public LinkedHashTreeMap.Node<K,V> next()
-
-