Exemple #1
0
        LetterNode FindOrCreateNextLetterNode(char nextLetter)
        {
            if (!this.nextLetter.TryGetValue(nextLetter, out LetterNode next))
            {
                next = new LetterNode(this)
                {
                    letter = nextLetter.ToString()
                };
                this.nextLetter.Add(nextLetter, next);
            }

            return(next);
        }
Exemple #2
0
 internal LetterNode(LetterNode parent = null)
 {
     this.parent = parent;
 }