private static LinkedHashMap<String,String> createParameterMap(final String queryString){
  if ((queryString == null) || queryString.isEmpty()) {
    return null;
  }
  final String[] pairs=queryString.split("&");
  final Map<String,String> params=new LinkedHashMap<>(pairs.length);
  for (  final String pair : pairs) {
    if (pair.isEmpty()) {
      continue;
    }
    String[] tokens=pair.split("=",2);
switch (tokens.length) {
case 1:
      if (pair.charAt(0) == '=') {
        params.put("",tokens[0]);
      }
 else {
        params.put(tokens[0],"");
      }
    break;
case 2:
  params.put(tokens[0],tokens[1]);
break;
}
}
return new LinkedHashMap<>(params);
}

private static LinkedHashMap < String , String > createParameterMap ( final String queryString ) { if ( ( queryString == null ) || queryString . isEmpty ( ) ) { return null ; } final String [ ] pairs = queryString . split ( "&" ) ; final Map < String , String > params = new LinkedHashMap < > ( pairs . length ) ; for ( final String pair : pairs ) { if ( pair . isEmpty ( ) ) { continue ; } String [ ] tokens = pair . split ( "=" , 2 ) ; switch ( tokens . length ) { case 1 : if ( pair . charAt ( 0 ) == '=' ) { params . put ( "" , tokens [ 0 ] ) ; } else { params . put ( tokens [ 0 ] , "" ) ; } break ; case 2 : params . put ( tokens [ 0 ] , tokens [ 1 ] ) ; break ; } } return new LinkedHashMap < > ( params ) ; }
takes a query string , separates the constituent name - value pairs , and stores them in a linkedhashmap ordered by their original order .
