code: public TrieBuilder<T> add(String word, T value) {
          assertNotEmptyWord(word);
  
          // Save the word-value pair in the map. The actual construction will be done later.
          if (map.containsKey(word)) {
              throw new IllegalArgumentException("Trie already contains a value for '"+word+"': " + map.get(word));
          }
          map.put(word, value);
          return this;
      }
docs: Add a word-value mapping to the Trie. Expects there not to be a previous mapping for the word.
  
  @param word The word for the word-value mapping.
  @param value The value for the word-value mapping.
  @return {@code this}, for chaining.
  @throws IllegalStateException If this Trie already contained a mapping for the given word.