code: public WebSocketExtension setParameter(String key, String value)
      {
          // Check the validity of the key.
          if (Token.isValid(key) == false)
          {
              // The key is not a valid token.
              throw new IllegalArgumentException("'key' is not a valid token.");
          }
  
          // If the value is not null.
          if (value != null)
          {
              // Check the validity of the value.
              if (Token.isValid(value) == false)
              {
                  // The value is not a valid token.
                  throw new IllegalArgumentException("'value' is not a valid token.");
              }
          }
  
          mParameters.put(key, value);
  
          return this;
      }
docs: Set a value to the specified parameter.
  
  @param key
  The name of the parameter.
  
  @param value
  The value of the parameter. If not {@code null}, it must be
  a valid token. Note that <a href="http://tools.ietf.org/html/rfc6455"
  >RFC 6455</a> says "<i>When using the quoted-string syntax
  variant, the value after quoted-string unescaping MUST
  conform to the 'token' ABNF.</i>"
  
  @return
  {@code this} object.
  
  @throws IllegalArgumentException
  <ul>
  <li>The key is not a valid token.
  <li>The value is not {@code null} and it is not a valid token.
  </ul>