get a Map of parameter from a & delimited parameter list

@param params
- the list of parameters
@return the map FIXME - should check that split creates and even number of
entries - add test case for this
358834
public Map<String, String> getParamMap(String params) {
    Map<String, String> result = new HashMap<String, String>();
    String[] paramlist = params.split("&");
    for (int i = 0; i < paramlist.length; i++) {
      String[] parts = paramlist[i].split("=");
      if (parts.length == 2)
        result.put(parts[0], parts[1]);
    }
    return result;
  }
1185658
public static Map<String, QueryParameter> getChildDependentParameters(List<QueryParameter> params, QueryParameter p) {
        Map<String, QueryParameter> result = new HashMap<String, QueryParameter>();
        for (QueryParameter param : params) {
            if (!param.equals(p)) {
                if (param.isDependent()) {
                    List<String> names = param.getDependentParameterNames();
                    if (names.contains(p.getName())) {
                        result.put(param.getName(), param);
                    }
                }
            }
        }
        return result;
    }
188259
public static Map<String, String> data(Map<String, String[]> params, Map.Entry<String, String>... others) {
        Map<String, String> result = new HashMap<>();
        // expand params
        for(Map.Entry<String, String[]> entry : params.entrySet()) {
            if (entry.getValue() == null || entry.getValue().length == 0)
                continue;
            else if (entry.getValue().length == 1 && ! entry.getKey().endsWith("[]"))
                result.put(entry.getKey(), entry.getValue()[0]);
            else {
                for(int i = 0; i < entry.getValue().length; i++) {
                    String key = entry.getKey().replaceAll("\\[\\]$", "") + "[" + i + "]";
                    result.put(key, entry.getValue()[i]);
                }
            }
        }
        // merge in others
        for(Map.Entry<String, String> entry : others) {
            result.put(entry.getKey(), entry.getValue());
        }
        return result;
    }
849467
private Map<String, Object> parseRequestParameters(String requestParameters) {

        Map<String, Object> parameterMap;
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(requestParameters)) {
            parameterMap = new HashMap<String, Object>();
            String[] params = requestParameters.split("&");
            for (int i = 0; i < params.length; i++) {
                int position = params[i].indexOf("=");
                if (position >= 0) {
                    String key = params[i].substring(0, position);
                    String value = params[i].substring(position + 1);
                    if (value.contains(",")) {
                        parameterMap.put(key, value.split(","));
                    } else {
                        parameterMap.put(key, value);
                    }
                }
            }
        } else {
            parameterMap = Collections.<String, Object> emptyMap();
        }
        return parameterMap;
    }
917111
public Map<String, String[]> getParameterMap() {

        if (m_parameters == null) {
            m_parameters = CmsRequestUtil.createParameterMap(m_query);
        }
        return m_parameters;
    }
727248
public java.util.Collection<String> getParam(String paramName) {
        return this.params.get(paramName);
    }
448694
@SafeVarargs
    public final RequestBuilder params(Map.Entry<String, ?>... params) {
        this.params = Lists.of(params);
        return this;
    }
1167790
@SuppressWarnings({ "unchecked", "rawtypes" })
    public Map<String, List<String>> parameters() {
        return (Map<String, List<String>>) (Map) parameters.asMap();
    }
488453
public Map<String, List<String>> parameters() {
    if (params == null) {
      if (hasPath) {
        int pathLength = path().length();
        if (uri.length() == pathLength) {
          return Collections.emptyMap();
        }
        decodeParams(uri.substring(pathLength + 1));
      } else {
        if (uri.isEmpty()) {
          return Collections.emptyMap();
        }
        decodeParams(uri);
      }
    }
    return params;
  }
257870
private List<CmsSearchResult> getSearchResults(Map<String, String> params) {

        if (m_searchResults == null) {
            m_searchResults = getSearchBean(params).getSearchResult();
        }
        return m_searchResults;
    }
1085231
private static Map<String, String> filterParam(Map<String, String> params) {
        Map<String, String> ret = new HashMap<String, String>();
        if (params == null) {
            return ret;
        }

        for (Map.Entry<String, String> i : params.entrySet()) {
            if (i.getKey().startsWith("x:") && i.getValue() != null && !i.getValue().equals("")) {
                ret.put(i.getKey(), i.getValue());
            }
        }
        return ret;
    }
1274365
public static String getMapParamOrEmpty(Map<String,String[]> map, 
			String param) {
		String val = getMapParam(map, param);
		return (val == null) ? "" : val;
	}
696352
public static Map<String, String> getParamMap(ServletRequest request) {
		Map<String, String> params = new HashMap<String, String>();
		for (Map.Entry<String, String[]> entry : getParams(request).entrySet()) {
			params.put(entry.getKey(), ArrayUtil.join(entry.getValue(), StrUtil.COMMA));
		}
		return params;
	}
472232
protected Hashtable<String, String> parseParameter(String param){
        // 
        Hashtable<String, String> table = new Hashtable<>();
        
        try{	  
            matcher2 = pSeparator.matcher(param);
            while (matcher2.find()){
                // start of a request
                table.put(matcher2.group(1), matcher2.group(2));
                
            }
        } catch(Exception e){
        	logger.error(e.getMessage(), e);
        }
        return table;
        
    }
1148242
public static Parameters mergeParams(Parameters... parameters) {
		AnyValueMap map = AnyValueMap.fromMaps(parameters);
		return new Parameters(map);
	}
235607
private static Map<String, Object> localizeDecimalParams(final Map<String, Object> params) {
    Map<String, Object> localized = new HashMap<>(params.size());
    final NumberFormat localizedNumberFormatter = DecimalFormat.getNumberInstance();
    for (String key : params.keySet()) {
      final Object value = params.get(key);
      final Object newValue;
      if (value instanceof Float || value instanceof Double) {
        newValue = localizedNumberFormatter.format(value);
      } else
        newValue = value;
      localized.put(key, newValue);
    }
    return Collections.unmodifiableMap(localized);
  }
843080
@SuppressWarnings("unchecked")
  private static void getParamsFromJSON(Map<String, String> params, String json) {
    JSONParser parser = new JSONParser(json);
    try {
      Object o = ObjectBuilder.getVal(parser);
      if (!(o instanceof Map))
        return;
      Map<String, Object> map = (Map<String, Object>) o;
      // To make consistent with json.param handling, we should make query
      // params come after json params (i.e. query params should
      // appear to overwrite json params.

      // Solr params are based on String though, so we need to convert
      for (Map.Entry<String, Object> entry : map.entrySet()) {
        String key = entry.getKey();
        Object val = entry.getValue();
        if (params.get(key) != null) {
          continue;
        }
        if (val == null) {
          params.remove(key);
        } else if (val instanceof String) {
          params.put(key, (String) val);
        }
      }
    } catch (Exception e) {
      log.debug("ignore parse exceptions at this stage, they may be caused by incomplete macro expansions", e);
      return;
    }
  }