// Points the current value to the next child node and returns it, if there are no more child
// nodes, return nil
Points the current value to the next child node and returns it, if there are no more child
nodes, return nil
// Points the current value to the next child node and returns it if there are no more child // nodes return nil
func (t *tracenode) moveToNext(trie *Trie) *node {
	if t.node != nil && t.node.isCollapsed() {
		trie.expandNode(t.node)
	}
	var i byte = 0
	if t.index > childrenLength {
		t.index = 0
	} else if t.index == childrenLength {
	} else {
		i = t.index + 1
	}
	for ; i < childrenLength; i++ {
		if t.node.children[i] != nil {
			if t.index < childrenLength {
				if t.node.children[t.index] != nil && t.node.children[t.index].canCollapse() {
					t.node.children[t.index].collapse()
				}
			}
			t.index = i
			return t.node.children[i]
		}
	}
	return nil
}
func ( t * tracenode ) moveToNext ( trie * Trie ) * node { if t . node != nil && t . node . isCollapsed ( ) { trie . expandNode ( t . node ) } var i byte = 0 if t . index > childrenLength { t . index = 0 } else if t . index == childrenLength { } else { i = t . index + 1 } for ; i < childrenLength ; i ++ { if t . node . children [ i ] != nil { if t . index < childrenLength { if t . node . children [ t . index ] != nil && t . node . children [ t . index ] . canCollapse ( ) { t . node . children [ t . index ] . collapse ( ) } } t . index = i return t . node . children [ i ] } } return nil }
Points the current value to the next child node and returns it, if there are no more child
nodes, return nil
Points the current value to the next child node and returns it if there are no more child nodes return nil
// do nothing // Without this judgment, once the child is traversed once and the method is called // twice, it will be traversed again from the beginning // node before current node