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;
  }
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 ) ; formatted = null ; return this ; }
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.