public void Add(IDent dent) { Tree node = this; if (ident != null) { while (true) { if (node.ident.Hash > dent.Hash) { if (node.Left == null) { node.Left = new Tree(dent); return; } else { node = node.Left; } } else if (node.ident.Hash < dent.Hash) { if (node.Right == null) { node.Right = new Tree(dent); return; } else { node = node.Right; } } else { return; } } } else { ident = dent; } }
public Tree(IDent dent, int deep) { ident = dent; //x = deep; }
public Tree(IDent dent) { ident = dent; }