Add single parameter
165602
public RunParams param(String key, Object value) {
        params.put(key, value);
        return this;
    }
1289642
public void addParameter(ISUPParameter param) throws ParameterException {
        if (param == null) {
            throw new IllegalArgumentException("Argument must not be null");
        }
        int paramCode = param.getCode();
        if (this.mandatoryCodes.contains(paramCode)) {
            int index = this.mandatoryCodeToIndex.get(paramCode);
            this.f_Parameters.put(index, (AbstractISUPParameter) param);
            return;
        }

        if (this.mandatoryVariableCodes.contains(paramCode)) {
            int index = this.mandatoryVariableCodeToIndex.get(paramCode);
            this.v_Parameters.put(index, (AbstractISUPParameter) param);
            return;
        }
        if (this.optionalCodes.contains(paramCode)) {
            int index = this.optionalCodeToIndex.get(paramCode);
            this.o_Parameters.put(index, (AbstractISUPParameter) param);
            return;
        }

        throw new ParameterException("Parameter with code: " + paramCode
                + " is not defined in any type: mandatory, mandatory variable or optional");
    }
2335
public void addFunctionParameter(final String param) {
    if (param == null || param.isEmpty()) {
      throw new IllegalArgumentException("Parameter cannot be null or empty");
    }
    if (func_params == null) {
      func_params = Lists.newArrayList();
    }
    func_params.add(param);
  }
816218
public QueryRequest addParameter(String key, Object value) {
        if (parameters.get(key) == null) {
            parameters.put(key, Sets.newHashSet(value));
        } else {
            parameters.get(key).add(value);
        }
        return this;
    }
214797
def add_parameter(self, name, value):
        
        if name in self._parameters:
            raise ValueError("'%s' is already a parameter" % (name))
        elif name in self.__dict__:
            raise ValueError("'%s' conflicts with the Datamat name-space" % (name))

        self.__dict__[name] = value
        self._parameters[name] = self.__dict__[name]
979095
def insert_parameter(self, pname, ptype):
        ""
        index = self.insert_id(pname, SharedData.KINDS.PARAMETER, SharedData.KINDS.PARAMETER, ptype)
        #set parameter's attribute to it's ordinal number
        self.table[index].set_attribute("Index", self.shared.function_params)
        #set parameter's type in param_types list of a function
        self.table[self.shared.function_index].param_types.append(ptype)
        return index
138371
def set_param(self, key, value):
        
        self.__dict__[key] = value
        self._parameters[key] = value
767166
public T withParam(String name, String value) {
        parameters.put(name, value);
        return self;
    }
780423
def add_parameters(pValue)
      unless ((pValue.respond_to?(:has_key?) && pValue.length == 1) ||
               pValue.respond_to?(:to_str))
        return nil
      end
      @parameters.push(pValue)
    end
716108
public void addHiddenParam(PrintWriter out, String strParam, String strValue)
    {
        out.println("<input type=\"hidden\" name=\"" + strParam + "\" value=\"" + strValue + "\">");
    }
250926
def add_params(self, **kw):
        
        for k, v in kw.items():
            if (k not in self.params) and (k not in self.specific_params):
                raise ParameterError('"%s" is not a valid parameter for %s'
                                     % (k, self.__class__.__name__))
            try:
                self.params[k].validate(v)
            except KeyError:
                self.specific_params[k].validate(v)

        self._orig_kwargs.update(kw)
        self.kwargs = self._orig_kwargs.copy()
705464
@SuppressWarnings("unchecked")
  public Request addParameter(String name, Object value) {
    Map<String, Object> map = Objects.requireNonNull(parameterMap);
    if (!map.containsKey(name)) {
      map.put(name, value);
    } else {
      Object value0 = map.get(name);
      if (value0 instanceof Collection) {
        if (value instanceof Collection) {
          ((Collection) value0).addAll((Collection) value);
        } else {
          ((Collection) value0).add(value);
        }
      } else {
        List<Object> paramArray = new LinkedList<>();
        if (value instanceof Collection) {
          paramArray.addAll((Collection) value);
        } else {
          paramArray.add(value);
        }
        map.put(name, paramArray);
      }
    }
    return this;
  }
338467
def addParam(self, key, value, attrib=None):
        

        if key in self.rejectTags:
            return False  # TODO Replace with exception

        # Temporary code to handle the seperation tag than can occur several times with different units.
        # TODO code a full multi unit solution (github issue #1)
        if key == 'separation':
            if attrib is None:
                return False  # reject seperations without a unit
            try:
                if not attrib['unit'] == 'AU':
                    return False  # reject for now
            except KeyError:  # a seperation attribute exists but not one for units
                return False

        if key in self.params:  # if already exists

            if key == 'name':
                try:  # if flagged as a primary or popular name use this one, an option should be made to use either
                    if attrib['type'] == 'pri':  # first names or popular names.
                        oldname = self.params['name']
                        self.params['altnames'].append(oldname)
                        self.params['name'] = value
                    else:
                        self.params['altnames'].append(value)
                except (KeyError, TypeError):  # KeyError = no type key in attrib dict, TypeError = not a dict
                    self.params['altnames'].append(value)
            elif key == 'list':
                self.params['list'].append(value)
            else:
                try:
                    name = self.params['name']
                except KeyError:
                    name = 'Unnamed'
                print('rejected duplicate {0}: {1} in {2}'.format(key, value, name))  # TODO: log rejected value
                return False  # TODO Replace with exception

        else:  # If the key doesn't already exist and isn't rejected

            # Some tags have no value but a upperlimit in the attributes
            if value is None and attrib is not None:
                try:
                    value = attrib['upperlimit']
                except KeyError:
                    try:
                        value = attrib['lowerlimit']
                    except KeyError:
                        return False

            if key == 'rightascension':
                value = _ra_string_to_unit(value)
            elif key == 'declination':
                value = _dec_string_to_unit(value)
            elif key in self._defaultUnits:
                try:
                    value = float(value) * self._defaultUnits[key]
                except:
                    print('caught an error with {0} - {1}'.format(key, value))
            self.params[key] = value
567220
def set_parameters(self, parameter, value):
        
        if parameter == 'lo':
            self.parameters['lo'] = 1 / value
        else:
            self.parameters[parameter] = value
491447
def param(name, text, scope=nil)
      Runner.instance.add_param name, text, scope
    end
273409
def add_param(param):
    # type: (Param) -> Callable
    
    def inner(o):
        try:
            getattr(o, 'parameters').add(param)
        except AttributeError:
            setattr(o, 'parameters', {param})
        return o
    return inner
1278997
protected void appendParameters(StringBuilder buffer,String parameters)
    {
        if((parameters!=null)&&(parameters.length()>0))
        {
            String updatedParameters=parameters;
            if(parameters.startsWith("?"))
            {
                updatedParameters=parameters.substring(1);
            }
            
            if(updatedParameters.length()>0)
            {
                int currentLength=buffer.length();
                if((currentLength>0)&&(buffer.charAt(currentLength-1)=='/'))
                {
                    int length=currentLength;
                    buffer.delete(length-1,length);
                }
                
                //add separator
                buffer.append("?");
    
                try
                {
                    String[] parameterPairs=updatedParameters.split("&");
                    int amount=parameterPairs.length;
                    String parameterPair=null;
                    String[] values=null;
                    boolean addedParameters=false;
                    for(int index=0;index<amount;index++)
                    {
                        //get next element
                        parameterPair=parameterPairs[index];
                        
                        //split to key/value
                        values=parameterPair.split("=");
                        if(values.length==2)
                        {
                            if(addedParameters)
                            {
                                buffer.append("&");
                            }
                            
                            buffer.append(URLEncoder.encode(values[0],"UTF-8"));
                            buffer.append("=");
                            buffer.append(URLEncoder.encode(values[1],"UTF-8"));
                            
                            //set flag
                            addedParameters=true;
                        }
                    }
                }
                catch(Exception exception)
                {
                    throw new FaxException("Unable to encode parameters.",exception);
                }
            }
        }
    }