Build a parameter item.

@param <O> the type of parameterized object

@param parameterParams the primitive values for the color

@return a new fresh color item object
10914
public static <O extends Object> ParameterItem<O> create(final ObjectParameter<O> parameterParams) {
        // Ensure that the uid will be unique at runtime
        return (ParameterItem<O>) ParameterItemImpl.create(parameterParams.object()).uid(parameterIdGenerator.incrementAndGet()).set(parameterParams); // FIXME
    }
719828
public void addParameter(String name, ParameterType type) {
        parameters.put(name, new Parameter(name, type));
    }
713367
public RunParams params(Map<String, Object> params) {
        if (params == null) {
            throw new NullPointerException("\"params\" parameter can not be null");
        }
        this.params.putAll(params);
        return this;
    }
448694
@SafeVarargs
    public final RequestBuilder params(Map.Entry<String, ?>... params) {
        this.params = Lists.of(params);
        return this;
    }
972879
protected List<String> defaultParameterTypes(Class<?>[] parameterTypes) {
        List<String> names = new ArrayList<>();
        for (int i = 0; i < parameterTypes.length; i++) {
            names.add("arg" + i);
        }
        return names;
    }
305516
public static <X> String createParameterId(Type type, Set<Annotation> annotations) {
        StringBuilder builder = new StringBuilder();
        if (type instanceof Class<?>) {
            Class<?> c = (Class<?>) type;
            builder.append(c.getName());
        } else {
            builder.append(type.toString());
        }
        builder.append(createAnnotationCollectionId(annotations));
        return builder.toString();
    }
322183
public TemplateBuilder parameters(Map<String, String> parameters) {
		action.getParameter().putAll(parameters);
		return this;
	}
1266670
public static void addParameters(final IRequestParameters parameters,
		final Map<String, String[]> parameterMap)
	{
		final Set<String> parameterNames = parameters.getParameterNames();
		for (final String parameterName : parameterNames)
		{
			final List<StringValue> parameterValues = parameters.getParameterValues(parameterName);
			String[] stringArray = { };
			if ((parameterValues != null) && !parameterValues.isEmpty())
			{
				stringArray = new String[parameterValues.size()];
				for (int i = 0; i < parameterValues.size(); i++)
				{
					stringArray[i] = parameterValues.get(i).toString();
				}
				if (parameterMap.containsKey(parameterName))
				{
					stringArray = ArrayUtils.addAll(parameterMap.get(parameterName), stringArray);
				}
			}
			parameterMap.put(parameterName, stringArray);
		}
	}
1214118
private CmsSearchParameters getSearchParameters(Map<String, String> params) {

        CmsSearchParameters searchParams = new CmsSearchParameters();
        searchParams.setQuery(params.get(PARAM_QUERY));
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(params.get(PARAM_SORT))) {
            searchParams.setSortName(params.get(PARAM_SORT));
        }
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(params.get(PARAM_MINCREATIONDATE))) {
            searchParams.setMinDateCreated(Long.parseLong(params.get(PARAM_MINCREATIONDATE)));
        }
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(params.get(PARAM_MAXCREATIONDATE))) {
            searchParams.setMaxDateCreated(Long.parseLong(params.get(PARAM_MAXCREATIONDATE)));
        }
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(params.get(PARAM_MINLASTMODIFICATIONDATE))) {
            searchParams.setMinDateLastModified(Long.parseLong(params.get(PARAM_MINLASTMODIFICATIONDATE)));
        }
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(params.get(PARAM_MAXLASTMODIFICATIONDATE))) {
            searchParams.setMaxDateLastModified(Long.parseLong(params.get(PARAM_MAXLASTMODIFICATIONDATE)));
        }
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(params.get(PARAM_INDEXNAME))) {
            searchParams.setIndex(params.get(PARAM_INDEXNAME));
        }

        List<String> fields = CmsStringUtil.splitAsList(params.get(PARAM_FIELDS), ',');
        searchParams.setFields(fields);
        searchParams.setSearchPage(Integer.parseInt(params.get(I_CmsListResourceCollector.PARAM_PAGE)));
        return searchParams;
    }
1067966
public static ItemStack getItemStackFromParameterString(String parameters)
    {
        // Split into parameters:
        List<String> params = new ArrayList<String>(Arrays.asList(parameters.split(" ")));
        Colour col = null;
        Variation var = null;

        // See if any parameters appear to be a colour:
        Iterator<String> it = params.iterator();
        while (it.hasNext() && col == null)
        {
            col = MinecraftTypeHelper.attemptToGetAsColour(it.next());
            if (col != null)
                it.remove();    // This parameter was a colour - we've parsed it, so remove it.
        }

        // See if any parameters appear to be a variant:
        it = params.iterator();
        while (it.hasNext() && var == null)
        {
            var = MinecraftTypeHelper.attemptToGetAsVariant(it.next());
            if (var != null)
                it.remove();    // This parameter was a variant - we've parsed it, so remove it.
        }

        // Hopefully we have at most one parameter left, which will be the type.
        if (params.size() == 0)
            return null;  // Dunno what to do, really.

        String itemName = params.get(0);
        DrawItem di = new DrawItem();
        di.setColour(col);
        di.setVariant(var);
        di.setType(itemName);
        return getItemStackFromDrawItem(di);
    }
1018389
public static <O extends Object> ParameterItem<O> create(final String name, final O defaultValue) {
        return create(new ObjectParameter<>(name, defaultValue));
    }
198000
public void addParameterSources(List<ParameterBinding> parameters) {
        assert parameters != null;
        for (ParameterBinding parameter : parameters) {
        	DataSource<?> inputValue = rpcSourceFromParameter(parameter);            
            this.inputSources.put(parameter.getName(), inputValue);
        }
    }
297860
@NotNull
    protected Map<String, Object> toParameterTypes(ParameterElement... parameters) {
        final LinkedHashMap<String, Object> map = new LinkedHashMap<>(parameters.length);
        for (ParameterElement ce : parameters) {
            final ClassElement type = ce.getType();
            if (type == null) {
                continue;
            }
            final Type typeReference = getTypeForElement(type);
            map.put(ce.getName(), typeReference);
        }

        return map;
    }
480223
public void setParameters(java.util.Map<String, java.util.List<String>> parameters) {
        this.parameters = parameters;
    }
886970
private void addCharts(PageParameters parameters){

        List<Chart> charts = getChartFromParams(parameters);

        //If we have more than one chart - use SmallComponents
        if(charts.size() > 1){
            List<SmallChartComponent> components = new ArrayList<>();
            for(Chart i : charts){
                components.add(new SmallChartComponent(i));
            }
            add( new ListView<SmallChartComponent>( "components", components ){
                protected void populateItem(ListItem item)
                {
                    item.add( (SmallChartComponent)item.getModelObject() );
                }
            });
        }else { //else use the regular full-width chart component
            List<ChartComponent> components = new ArrayList<>();
            for (Chart i : charts) {
                components.add(new ChartComponent(i));
            }
            add( new ListView<ChartComponent>( "components", components ){
                protected void populateItem(ListItem item)
                {
                    item.add( (ChartComponent)item.getModelObject() );
                }
            });
        }

        //Add Code Components
        List<CodeComponent> code_components = new ArrayList<>();
        for(Chart i : charts){
            code_components.add(new CodeComponent(i));
        }
        add( new ListView<CodeComponent>( "code_components", code_components ){
            protected void populateItem(ListItem item){
                item.add( (CodeComponent)item.getModelObject() );
            }
        });
    }
507334
private URL buildUriWithParameters(URL url, Map<String, String> params) throws URISyntaxException, MalformedURLException {
        if (params == null || params.isEmpty()) {
            return url;
        }
        URIBuilder uriBuilder = new URIBuilder(url.toURI());
        for (String paramName : params.keySet()) {
            uriBuilder.addParameter(paramName, params.get(paramName));
        }
        return uriBuilder.build().toURL();
    }
907885
public URIBuilder queryParameters( Map<String, String> queryParams )
    {
        this.queryParams.clear();
        this.queryParams.putAll( queryParams );
        return this;
    }