// for de-serialization only
for de-serialization only
// for de - serialization only
func (n *TreeNode) fromSerialNode(adapter db.DataAdapter, sn *serialNode) {
	if sn == nil {
		return
	}
	n.isLeaf = sn.IsLeaf
	for i := 0; i < childrenLength; i++ {
		n.Children[i] = nil
		n.Leafs[i] = nil
	}
	n.Branchs = sn.NeededBranchs
	if n.isLeaf {
		n.Leafs = sn.ChildrenOrLeafs
	} else {
		for i := 0; i < childrenLength; i++ {
			if sn.ChildrenOrLeafs[i] != nil {
				n.Children[i] = NewTreeNode()
				_ = n.Children[i].PutValue(adapter, []byte(""), sn.ChildrenOrLeafs[i])
			}
		}
	}
	n.isDirty = false
}
func ( n * TreeNode ) fromSerialNode ( adapter db . DataAdapter , sn * serialNode ) { if sn == nil { return } n . isLeaf = sn . IsLeaf for i := 0 ; i < childrenLength ; i ++ { n . Children [ i ] = nil n . Leafs [ i ] = nil } n . Branchs = sn . NeededBranchs if n . isLeaf { n . Leafs = sn . ChildrenOrLeafs } else { for i := 0 ; i < childrenLength ; i ++ { if sn . ChildrenOrLeafs [ i ] != nil { n . Children [ i ] = NewTreeNode ( ) _ = n . Children [ i ] . PutValue ( adapter , [ ] byte ( " " ) , sn . ChildrenOrLeafs [ i ] ) } } } n . isDirty = false }
for de-serialization only
for de - serialization only