public void Add(WordContainer container) {

			for (int i = 0; i < Children.Count; i++) {
			
				if (Children [i].IsParentOf (container)) {
				
					Children [i].Add (container);

					return;
				
				}
		
				if (Children [i].IsChildOf (container)) {
				
					container.Add (Children [i]);
					Children.RemoveAt (i);
					i--;

				}

			}

			Children.Add (container);

		}
Пример #2
0
        public void Add(WordContainer container)
        {
            for (int i = 0; i < Children.Count; i++)
            {
                if (Children [i].IsParentOf(container))
                {
                    Children [i].Add(container);

                    return;
                }

                if (Children [i].IsChildOf(container))
                {
                    container.Add(Children [i]);
                    Children.RemoveAt(i);
                    i--;
                }
            }

            Children.Add(container);
        }
Пример #3
0
 public void AddWord(IWord word)
 {
     m_tree.Add(new WordContainer(word));
 }