code: public Phrase put(String key, CharSequence value) {
      if (!keys.contains(key)) {
        throw new IllegalArgumentException("Invalid key: " + key);
      }
      if (value == null) {
        throw new IllegalArgumentException("Null value for '" + key + "'");
      }
      keysToValues.put(key, value);
  
      // Invalidate the cached formatted text.
      formatted = null;
      return this;
    }
docs: Replaces the given key with a non-null value. You may reuse Phrase instances and replace
  keys with new values.
  
  @throws IllegalArgumentException if the key is not in the pattern.