public bool DeleteWord(String sWord)
        {
            LengthGroup oLengthGroup = FindLengthGroup(sWord.Length);

            if (oLengthGroup != null)
            {
                return(oLengthGroup.DeleteWord(sWord));
            }
            return(false);
        }
        public bool WordExists(String sWord)
        {
            LengthGroup oLengthGroup = FindLengthGroup(sWord.Length);

            if (oLengthGroup != null)
            {
                return(oLengthGroup.WordExists(sWord));
            }
            return(false);
        }
        public bool InsertWord(String sNewWord)
        {
            Debug.Assert(sNewWord.Length > 0);

            LengthGroup oLengthGroup = FindLengthGroup(sNewWord.Length);

            if (oLengthGroup != null)
            {
                return(oLengthGroup.InsertWord(sNewWord));
            }

            LengthGroup oNewLengthGroup = new LengthGroup(sNewWord);

            LengthGroups.Add(oNewLengthGroup);
            return(true);
        }
 public bool UpdateWord(String sOldValue, String sNewValue)
 {
     if (sOldValue.Length == sNewValue.Length)
     {
         LengthGroup oLengthGroup = FindLengthGroup(sOldValue.Length);
         if (oLengthGroup != null)
         {
             return(oLengthGroup.UpdateWord(sOldValue, sNewValue));
         }
         return(false);
     }
     else
     {
         if (InsertWord(sNewValue))
         {
             return(DeleteWord(sOldValue));
         }
         return(false);
     }
 }