code: public TrieBuilder addWord(@Nonnull final String word)
      {
          Objects.requireNonNull(word);
  
          final int length = word.length();
  
          if (length == 0)
              throw new IllegalArgumentException("a trie cannot have empty "
                  + "strings (use EMPTY instead)");
          nrWords++;
          maxLength = Math.max(maxLength, length);
          nodeBuilder.addWord(word);
          return this;
      }
docs: Add one word to the trie
  
  @param word the word to add
  @return this
  @throws IllegalArgumentException word is empty