/// <summary> /// The base constructor accepting a T value and optional NodeMeta /// </summary> public Node(T value, NodeMeta meta = null) { Value = value; if (meta != null) { Meta = meta; } }
/// <summary> /// The public constructor accepting a T value and meta data /// </summary> public CompositeNode(T value, NodeMeta meta = null) : base(value, meta) { }
/// <summary> /// The public virtual factory method to create and add a new child composite /// </summary> public virtual void AddChildComposite(T value, NodeMeta meta = null) => AddChild(new CompositeNode <T>() { Value = value, Meta = meta });
/// <summary> /// The public virtual factory method to create and add a new child leaf node /// </summary> public virtual void AddChildLeaf(T value, NodeMeta meta = null) => AddChild(new LeafNode <T>() { Value = value, Meta = meta });