Esempio n. 1
0
        public Boolean AddEntry(AbsoluteCrosspath path)
        {
            NTree <String> fs = (NTree <String>) this;

            foreach (String pathEntry in path)
            {
                if (fs.children[pathEntry] == null)
                {
                    fs.children[pathEntry] = new NTree <String>(fs, pathEntry);
                }
                else
                {
                    fs = fs.children[pathEntry];
                }
            }

            return(false);
        }
Esempio n. 2
0
 public NTree(NTree <T> parent, T value) : this(value) {
     this.parent = parent;
 }
Esempio n. 3
0
 public NTree(T value)
 {
     this.value = value;
     parent     = null;
     children   = new SortedDictionary <T, NTree <T> >();
 }