Class SimpleTree<T>
- Namespace
- Dynamicweb.Core
- Assembly
- Dynamicweb.Core.dll
Base implementation of a generic tree using integer keys.
public class SimpleTree<T> : SimpleTreeBase<int, T> where T : class
Type Parameters
T
Object type in the tree
- Inheritance
-
SimpleTreeBase<int, T>SimpleTree<T>
- Inherited Members
Constructors
SimpleTree(int, bool)
Creates an empty tree.
public SimpleTree(int key, bool makeDummyRoot = false)
Parameters
key
intId of tree
makeDummyRoot
boolDefines if a dummy root should be created (this root has id 0)
Methods
MakeSubTree(int, bool)
Makes a subtree from the specified location in the tree.
public SimpleTree<T> MakeSubTree(int key, bool isShallow = true)
Parameters
key
intsubtree starting location
isShallow
boolDefines if a deep clone of the tree should be performed, for use when the subtree needs to have modified the parent of nodes
Returns
- SimpleTree<T>
MakeSubTree(int, int, bool)
Makes a subtree from the specified location in the tree.
public SimpleTree<T> MakeSubTree(int treeId, int key, bool isShallow)
Parameters
treeId
intId of newly created tree
key
intSubtree starting location
isShallow
boolDefines if a deep clone of the tree should be performed, for use when the subtree needs to modify the parent of nodes
Returns
- SimpleTree<T>
subTree