helper to extend the layoutParams of the drawer

@param params
@return
19183
public static DrawerLayout.LayoutParams processDrawerLayoutParams(DrawerBuilder drawer, DrawerLayout.LayoutParams params) {
        if (params != null) {
            if (drawer.mDrawerGravity != null && (drawer.mDrawerGravity == Gravity.RIGHT || drawer.mDrawerGravity == Gravity.END)) {
                params.rightMargin = 0;
                if (Build.VERSION.SDK_INT >= 17) {
                    params.setMarginEnd(0);
                }

                params.leftMargin = drawer.mActivity.getResources().getDimensionPixelSize(R.dimen.material_drawer_margin);
                if (Build.VERSION.SDK_INT >= 17) {
                    params.setMarginEnd(drawer.mActivity.getResources().getDimensionPixelSize(R.dimen.material_drawer_margin));
                }
            }

            if (drawer.mDrawerWidth > -1) {
                params.width = drawer.mDrawerWidth;
            } else {
                params.width = DrawerUIUtils.getOptimalDrawerWidth(drawer.mActivity);
            }
        }

        return params;
    }
943544
private Map<String, String> getParameters(String param) {

        if (CmsStringUtil.isNotEmpty(param)) {
            return CmsStringUtil.splitAsMap(param, "|", "=");
        }
        return Collections.emptyMap();
    }
32991
private List<Chart> getChartFromParams(final PageParameters params) {
        String chartString;
        List<Chart> config = new ArrayList<>();

        //If the showcase is started without any parameters
        //set the parameters to lineBasic and give us a line Chart
        final String chartComponentID = "chart";
        if(params.getAllNamed().isEmpty()){
            PageParameters temp = new PageParameters();
            temp.add("chart", "lineBasic");
            setResponsePage(HomepageChartJs.class, temp);
            config.add(new Chart(chartComponentID, new LineChartBasicConfiguration()));
            return config;
        }

        chartString = params.getAllNamed().get(0).getValue();
        if(chartString == null) {
    		config.add(new Chart(chartComponentID, new LineChartBasicConfiguration()));
    		return config;
    	}

        switch(chartString) {

            case "barVertical":
                config.add(new Chart(chartComponentID, new BarChartVerticalConfiguration()));
                break;

            case "barHorizontal":
                config.add(new Chart(chartComponentID, new BarChartHorizontalConfiguration()));
                break;

            case "barMultiAxis":
                config.add(new Chart(chartComponentID, new BarChartMultiAxisConfiguration()));
                break;

            case "barStacked":
                config.add(new Chart(chartComponentID, new BarChartStackedConfiguration()));
                break;

            case "barStackedGroup":
                config.add(new Chart(chartComponentID, new BarChartStackedGroupConfiguration()));
                break;

            case "lineBasic":
                config.add(new Chart(chartComponentID, new LineChartBasicConfiguration()));
                break;

            case "lineMultiAxis":
                config.add(new Chart(chartComponentID, new LineChartMultiAxisConfiguration()));
                break;

            case "lineStepped":
                config.add(new Chart(chartComponentID, new LineChartSteppedBeforeConfiguration()));
                config.add(new Chart(chartComponentID, new LineChartSteppedAfterConfiguration()));
                break;

            case "lineInterpolated":
                config.add(new Chart(chartComponentID, new LineChartInterpolatedConfiguration()));
                break;

            case "lineStyles":
                config.add(new Chart(chartComponentID, new LineStylesConfiguration()));
                break;

            case "pointStyles":
                config.add(new Chart(chartComponentID, new PointStylesConfiguration()));
                break;

            case "pointSizes":
                config.add(new Chart(chartComponentID, new LineChartWithDifferentPointSizesConfiguration()));
                break;

            case "areaLineBoundaries":
                config.add(new Chart(chartComponentID, new AreaLineBoundariesChartStartConfiguration()));
                config.add(new Chart(chartComponentID, new AreaLineBoundariesChartEndConfiguration()));
                config.add(new Chart(chartComponentID, new AreaLineBoundariesChartOriginConfiguration()));
                config.add(new Chart(chartComponentID, new AreaLineBoundariesChartFalseConfiguration()));
                break;

            case "lineDataset":
                config.add(new Chart(chartComponentID, new LineChartAreaDatasetConfiguration()));
                break;

            case "lineStacked":
                config.add(new Chart(chartComponentID, new LineChartStackedConfiguration()));
                break;

            case "radar":
                config.add(new Chart(chartComponentID, new RadarChartConfiguration()));
                break;

            case "scatter":
                config.add(new Chart(chartComponentID, new ScatterChartConfiguration()));
                break;

            case "scatterMultiAxis":
                config.add(new Chart(chartComponentID, new ScatterChartMultiAxisConfiguration()));
                break;

            case "doughnut":
                config.add(new Chart(chartComponentID, new DoughnutChartConfiguration()));
                break;

            case "pie":
                config.add(new Chart(chartComponentID, new PieChartConfiguration()));
                break;

            case "polarArea":
                config.add(new Chart(chartComponentID, new PolarAreaChartConfiguration()));
                break;

            case "radar2":
                config.add(new Chart(chartComponentID, new OtherRadarChartConfiguration()));
                break;

            case "comboBarLine":
                config.add(new Chart(chartComponentID, new ComboBarLineChartConfiguration()));
                break;

            case "stepSize":
                config.add(new Chart(chartComponentID, new LinearStepSizeConfiguration()));
                break;

            case "minMax":
                config.add(new Chart(chartComponentID, new MinMaxConfiguration()));
                config.add(new Chart(chartComponentID, new MinMaxSuggestedConfiguration()));
                break;

            case "lineLogarithmic":
                config.add(new Chart(chartComponentID, new LogarithmicLineChartConfiguration()));
                break;

            case "scatterLogarithmic":
                config.add(new Chart(chartComponentID, new LogarithmicScatterChartConfiguration()));
                break;

            case "timeLine":
                config.add(new Chart(chartComponentID, new TimeLineConfiguration()));
                break;

            case "timePoint":
                config.add(new Chart(chartComponentID, new TimePointConfiguration()));
                break;

            case "timeSeries":
                config.add(new Chart(chartComponentID, new TimeSeriesConfiguration()));
                break;

            case "timeCombo":
                config.add(new Chart(chartComponentID, new TimeComboConfigurationWicket8()));
                break;

            case "gridLines":
                config.add(new Chart(chartComponentID, new GridLinesBasicConfiguration()));
                config.add(new Chart(chartComponentID, new GridLinesDisplayFalseConfiguration()));
                config.add(new Chart(chartComponentID, new GridLinesDisplayFalseNoBorderConfiguration()));
                config.add(new Chart(chartComponentID, new GridLinesChartAreaConfiguration()));
                config.add(new Chart(chartComponentID, new GridLinesTicksConfiguration()));
                config.add(new Chart(chartComponentID, new GridLineStylesConfiguration()));
                break;

            case "multiLineLabels":
                config.add(new Chart(chartComponentID, new MultilineLabelsConfiguration()));
                break;

            case "filteringLabels":
                config.add(new Chart(chartComponentID, new FilteringLabelsConfiguration()));
                break;

            case "nonNumeric":
                config.add(new Chart(chartComponentID, new NonNumericConfiguration()));
                break;

            case "legendPosition":
                config.add(new Chart(chartComponentID, new LegendPositionTopConfiguration()));
                config.add(new Chart(chartComponentID, new LegendPositionRightConfiguration()));
                config.add(new Chart(chartComponentID, new LegendPositionBottomConfiguration()));
                config.add(new Chart(chartComponentID, new LegendPositionLeftConfiguration()));
                break;

            case "legendPointStyle":
                config.add(new Chart(chartComponentID, new LegendPointStyleConfiguration()));
                break;

            case "tooltip":
                config.add(new Chart(chartComponentID, new TooltipBorderConfiguration()));
                config.add(new Chart(chartComponentID, new TooltipCallbacksConfiguration()));
                config.add(new Chart(chartComponentID, new TooltipAverageConfiguration()));
                config.add(new Chart(chartComponentID, new TooltipNearestConfiguration()));
                break;

            case "tooltipHtml":
                config.add(new Chart(chartComponentID, new TooltipHtmlLineConfiguration()));
                config.add(new Chart(chartComponentID, new TooltipHtmlPieConfigurationWicket8()));
                config.add(new Chart(chartComponentID, new TooltipHtmlPointsConfigurationWicket8()));
                break;

            case "bubble":
                config.add(new Chart(chartComponentID, new BubbleChartConfiguration()));
                break;

            case "lineProgressBar":
                config.add(new Chart(chartComponentID, new LineChartProgressBarConfigurationWicket8()));
                break;

            case "dataLabelling":
                config.add(new Chart(chartComponentID, new DataLabellingChartConfiguration()));
                break;

            case "tooltipInteractions":
                config.add(new Chart(chartComponentID, new DatasetIntersectFalseConfiguration()));
                config.add(new Chart(chartComponentID, new DatasetIntersectTrueConfiguration()));
                config.add(new Chart(chartComponentID, new IndexIntersectFalseConfiguration()));
                config.add(new Chart(chartComponentID, new IndexIntersectTrueConfiguration()));
                config.add(new Chart(chartComponentID, new NearestIntersectFalseConfiguration()));
                config.add(new Chart(chartComponentID, new NearestIntersectTrueConfiguration()));
                config.add(new Chart(chartComponentID, new PointIntersectFalseConfiguration()));
                config.add(new Chart(chartComponentID, new PointIntersectTrueConfiguration()));
                config.add(new Chart(chartComponentID, new xIntersectFalseConfiguration()));
                config.add(new Chart(chartComponentID, new xIntersectTrueConfiguration()));
                config.add(new Chart(chartComponentID, new yIntersectFalseConfiguration()));
                config.add(new Chart(chartComponentID, new yIntersectTrueConfiguration()));
                break;

            default:
                config.add(new Chart(chartComponentID, new LineChartBasicConfiguration()));
                break;
        }
        return config;
    }
1373880
public SwipeBack setContentView(View view, LayoutParams params) {
		switch (mDragMode) {
		case SwipeBack.DRAG_CONTENT:
			mContentContainer.removeAllViews();
			mContentContainer.addView(view, params);
			break;

		case SwipeBack.DRAG_WINDOW:

			// mActivity can be null if inflated from xml, so retrieve activity
			// if (mActivity == null) {
			// mActivity = (Activity) getContext();
			// }

			mActivity.setContentView(view, params);
			break;
		}

		return this;
	}
448694
@SafeVarargs
    public final RequestBuilder params(Map.Entry<String, ?>... params) {
        this.params = Lists.of(params);
        return this;
    }
421551
public static URI addParams(
            final URI uri, final Multimap<String, String> params, final Set<String> overrideParams) {
        if (params == null || params.isEmpty()) {
            return uri;
        }
        final String origTxt = uri.toString();
        int queryStart = origTxt.indexOf('?');
        final StringBuilder result = new StringBuilder();
        if (queryStart < 0) {
            int fragmentStart = origTxt.indexOf('#');
            if (fragmentStart < 0) {
                result.append(origTxt);
            } else {
                result.append(origTxt, 0, fragmentStart);
            }
        } else {
            result.append(origTxt, 0, queryStart);
        }

        Map<String, Collection<String>> origParams = getParameters(uri).asMap();
        boolean first = true;
        for (Map.Entry<String, Collection<String>> param: params.asMap().entrySet()) {
            final String key = param.getKey();
            Collection<String> origList = origParams.remove(key);
            if (origList != null && (overrideParams == null || !overrideParams.contains(key))) {
                first = addParams(result, first, key, origList);
            }
            Collection<String> list = param.getValue();
            first = addParams(result, first, key, list);
        }

        for (Map.Entry<String, Collection<String>> param: origParams.entrySet()) {
            final String key = param.getKey();
            Collection<String> list = param.getValue();
            first = addParams(result, first, key, list);
        }

        if (uri.getFragment() != null) {
            result.append('#').append(uri.getRawFragment());
        }

        try {
            return new URI(result.toString());
        } catch (URISyntaxException e) {
            throw ExceptionUtils.getRuntimeException(e);
        }
    }
1198249
public String expand(Map<String, Object> parameters) {
        StringBuilder builder = new StringBuilder();
        boolean previousHasContent = false;
        boolean anyPreviousHasOperator = false;
        for (PathSegment segment : segments) {
            String result = segment.expand(parameters, previousHasContent, anyPreviousHasOperator);
            if (result == null) {
                break;
            }
            if (segment instanceof UriTemplateParser.VariablePathSegment) {
                if (result.contains(String.valueOf(((UriTemplateParser.VariablePathSegment) segment).getOperator()))) {
                    anyPreviousHasOperator = true;
                }
            }
            previousHasContent = result.length() > 0;
            builder.append(result);
        }

        return builder.toString();
    }
48887
public TemplateBase __setRenderArgs0(__ParameterList params) {
        _params = null == params ? new __ParameterList() : params;
        __renderArgs.putAll(_params.asMap());
        return this;
    }
75036
private static Map<String,String> parameterScanner(String parameters){
	
		String[] parametersArray = parameters.split(";");
		
		Map<String, String> localParametersMap = new HashMap<String, String>();
		
		for(int count=0;count < parametersArray.length; count++){
			String[] parameter  = parametersArray[count].split("=");
			localParametersMap.put(parameter[0], parameter[1]);
		}
		
		return localParametersMap;
	}
1217963
public static Map<String, String[]> getParameterMapFromJSON(JSONObject params) {

        Map<String, String[]> result = new HashMap<String, String[]>();
        Iterator<String> itKeys = params.keys();
        while (itKeys.hasNext()) {
            String key = itKeys.next();
            JSONArray paramValue = params.optJSONArray(key);
            result.put(key, new String[paramValue.length()]);
            for (int i = 0, l = paramValue.length(); i < l; i++) {
                result.get(key)[i] = paramValue.optString(i);
            }
        }
        return result;
    }
907885
public URIBuilder queryParameters( Map<String, String> queryParams )
    {
        this.queryParams.clear();
        this.queryParams.putAll( queryParams );
        return this;
    }
31357
private Chart getChartFromParams(final PageParameters params) {
        String chartString;
        String themeString;
        Chart config;

        //If the showcase is started without any parameters
        //set the parameters to lineBasic and give us a line Chart
        if(params.getAllNamed().size() < 2){
            PageParameters temp = new PageParameters();
            temp.add("theme", "default");
            temp.add("chart", "line");
            setResponsePage(HomepageHighcharts.class, temp);
            config = new Chart("chart", new BasicLineOptions(), null);
            return config;
        }

        themeString = params.getAllNamed().get(0).getValue();
        Theme theme = getThemeFromParams(themeString);
        chartString = params.getAllNamed().get(1).getValue();

        if(chartString == null) {
            config = new Chart("chart", new BasicLineOptions(), theme);
            return config;
        }

        switch(chartString) {
            case "basicBar":
                config = new Chart("chart", new BasicBarOptions(), theme);
                break;

            case "splineWithSymbols":
                config = new Chart("chart", new SplineWithSymbolsOptions(), theme);
                break;

            case "irregularIntervals":
                config = new Chart("chart", new TimeDataWithIrregularIntervalsOptions(), theme);
                break;

            case "logarithmicAxis":
                config = new Chart("chart", new LogarithmicAxisOptions(), theme);
                break;

            case "scatter":
                config = new Chart("chart", new ScatterPlotOptions(), theme);
                break;

            case "area":
                config = new Chart("chart", new BasicAreaOptions(), theme);
                break;

            case "areaWithNegativeValues":
                config = new Chart("chart", new AreaWithNegativeValuesOptions(), theme);
                break;

            case "stackedAndGroupedColumn":
                config = new Chart("chart", new StackedAndGroupedColumnOptions(), theme);
                break;

            case "combo":
                config = new Chart("chart", new ComboOptions(), theme);
                break;

            case "donut":
                config = new Chart("chart", new DonutOptions(), theme);
                break;

            case "withDataLabels":
                config = new Chart("chart", new LineWithDataLabelsOptions(), theme);
                break;

            case "zoomableTimeSeries":
                config = new Chart("chart", new ZoomableTimeSeriesOptions(), theme);
                break;

            case "splineInverted":
                config = new Chart("chart", new SplineWithInvertedAxisOptions(), theme);
                break;

            case "splineWithPlotBands":
                config = new Chart("chart", new SplineWithPlotBandsOptions(), theme);
                break;

            case "polar":
                config = new Chart("chart", new PolarOptions(), theme);
                break;

            case "stackedArea":
                config = new Chart("chart", new StackedAreaOptions(), theme);
                break;

            case "percentageArea":
                config = new Chart("chart", new PercentageAreaOptions(), theme);
                break;

            case "areaMissing":
                config = new Chart("chart", new AreaMissingOptions(), theme);
                break;

            case "areaInverted":
                config = new Chart("chart", new AreaInvertedAxisOptions(), theme);
                break;

            case "areaSpline":
                config = new Chart("chart", new AreaSplineOptions(), theme);
                break;

            case "areaSplineRange":
                config = new Chart("chart", new AreaSplineRangeOptions(), theme);
                break;

            case "columnWithDrilldown":
                config = new Chart("chart", new ColumnWithDrilldownOptions(), theme);
                break;

            case "columnRotated":
                config = new Chart("chart", new ColumnWithRotatedLabelsOptions(), theme);
                break;

            case "stackedBar":
                config = new Chart("chart", new StackedBarOptions(), theme);
                break;

            case "barNegativeStack":
                config = new Chart("chart", new StackedBarOptions(), theme);
                break;

            case "basicColumn":
                config = new Chart("chart", new BasicColumnOptions(), theme);
                break;

            case "columnWithNegativeValues":
                config = new Chart("chart", new ColumnWithNegativeValuesOptions(), theme);
                break;

            case "stackedColumn":
                config = new Chart("chart", new StackedColumnOptions(), theme);
                break;

            case "stackedPercentage":
                config = new Chart("chart", new StackedPercentageOptions(), theme);
                break;

            case "basicPie":
                config = new Chart("chart", new BasicPieOptions(), theme);
                break;

            case "pieWithGradient":
                config = new Chart("chart", new PieWithGradientOptions(), theme);
                break;

            case "pieWithLegend":
                config = new Chart("chart", new PieWithLegendOptions(), theme);
                break;

            case "splineUpdating":
                config = new Chart("chart", new WicketSplineUpdatingOptions(), theme);
                break;

            case "bubble":
                config = new Chart("chart", new BubbleChartOptions(), theme);
                break;

            case "3dbubble":
                config = new Chart("chart", new BubbleChart3DOptions(), theme);
                break;

            case "boxplot":
                config = new Chart("chart", new BoxplotChartOptions(), theme);
                break;

            case "interactive":
                config = new Chart("chart", new InteractionOptions(), theme);
                break;

            case "angularGauge":
                config = new Chart("chart", new AngularGaugeOptions(), theme);
                break;

            case "spiderweb":
                config = new Chart("chart", new SpiderwebOptions(), theme);
                break;

            case "windrose":
                config = new Chart("chart", new WindroseOptions(), theme);
                break;

            case "columnrange":
                config = new Chart("chart", new ColumnRangeOptions(), theme);
                break;

            case "arearange":
                config = new Chart("chart", new AreaRangeOptions(), theme);
                break;

            case "clicktoadd":
                config = new Chart("chart", new ClickToAddAPointOptions(), theme);
                break;

            case "dualAxes":
                config = new Chart("chart", new DualAxesOptions(), theme);
                break;

            case "scatterWithRegression":
                config = new Chart("chart", new ScatterWithRegressionLineOptions(), theme);
                break;

            case "multipleAxes":
                config = new Chart("chart", new MultipleAxesOptions(), theme);
                break;

            case "errorBar":
                config = new Chart("chart", new ErrorBarOptions(), theme);
                break;

            case "funnel":
                config = new Chart("chart", new FunnelOptions(), theme);
                break;

            case "pyramid":
                config = new Chart("chart", new PyramidOptions(), theme);
                break;

            case "heatmap":
                config = new Chart("chart", new HeatmapOptions(), theme);
                break;

            default:
                config = new Chart("chart", new BasicLineOptions(), theme);
                break;
        }
        return config;
    }
141497
public void setLayoutParameters() {
        final int keypadWidth = styledAttributes.getDimensionPixelOffset(R.styleable.PinLock_keypadWidth, 200);
        final int keypadHeight = styledAttributes.getDimensionPixelOffset(R.styleable.PinLock_keypadHeight, 230);
        final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(keypadWidth, keypadHeight);
        params.gravity = 17;
        setLayoutParams(params);
    }
1267830
public void move(MovingParams params) {
		LOGGER.trace("About to move the Action Button: X-axis delta = {}, Y-axis delta = {}",
				params.getXAxisDelta(), params.getYAxisDelta());
		mover.move(params);
	}
1148242
public static Parameters mergeParams(Parameters... parameters) {
		AnyValueMap map = AnyValueMap.fromMaps(parameters);
		return new Parameters(map);
	}
663902
@Override
    public boolean parseParameters(Object params)
    {
        if (params == null || !(params instanceof BuildBattleDecorator))
            return false;

        this.params = (BuildBattleDecorator) params;

        this.sourceBounds = this.params.getGoalStructureBounds();
        this.destBounds = this.params.getPlayerStructureBounds();
        this.delta = new Vec3i(destBounds.getMin().getX() - sourceBounds.getMin().getX(),
                               destBounds.getMin().getY() - sourceBounds.getMin().getY(),
                               destBounds.getMin().getZ() - sourceBounds.getMin().getZ());
        
        this.structureVolume = volumeOfBounds(this.sourceBounds);
        assert(this.structureVolume == volumeOfBounds(this.destBounds));
        this.dest = new ArrayList<IBlockState>(Collections.nCopies(this.structureVolume, (IBlockState)null));
        this.source = new ArrayList<IBlockState>(Collections.nCopies(this.structureVolume, (IBlockState)null));
        
        DrawBlockBasedObjectType tickBlock = this.params.getBlockTypeOnCorrectPlacement();
        DrawBlockBasedObjectType crossBlock = this.params.getBlockTypeOnIncorrectPlacement();

        this.blockTypeOnCorrectPlacement = (tickBlock != null) ? new XMLBlockState(tickBlock.getType(), tickBlock.getColour(), tickBlock.getFace(), tickBlock.getVariant()) : null;
        this.blockTypeOnIncorrectPlacement = (crossBlock != null) ? new XMLBlockState(crossBlock.getType(), crossBlock.getColour(), crossBlock.getFace(), crossBlock.getVariant()) : null;
        return true;
    }
401148
public void setParams(java.util.Collection<UpdateParam> params) {
        if (params == null) {
            this.params = null;
            return;
        }

        this.params = new java.util.ArrayList<UpdateParam>(params);
    }