@Override public Iterable<String> all(String name) { return query.getAll(name); }
@Override public List<String> getQueryParams(String param) { List<String> queryParams = request.getQuery().getAll(param); return queryParams==null?null:Lists.newArrayList(queryParams); }
@Override public List<String> getQueryParams(String param) { List<String> queryParams = request.getQuery().getAll(param); return queryParams==null?null:Lists.newArrayList(queryParams); }
@Override public ImmutableMap<String, ImmutableList<String>> getQueryParams() { if (queryParams == null) { ImmutableMap.Builder<String, ImmutableList<String>> paramsBuilder = ImmutableMap.builder(); Query query = request.getQuery(); for (String param : query.keySet()) { paramsBuilder.put(param, ImmutableList.copyOf(query.getAll(param))); } queryParams = paramsBuilder.build(); } return queryParams; }
@Override public ImmutableMap<String, ImmutableList<String>> getQueryParams() { if (queryParams == null) { ImmutableMap.Builder<String, ImmutableList<String>> paramsBuilder = ImmutableMap.builder(); Query query = request.getQuery(); for (String param : query.keySet()) { paramsBuilder.put(param, ImmutableList.copyOf(query.getAll(param))); } queryParams = paramsBuilder.build(); } return queryParams; }
/** * This method is used to insert a collection of tokens into * the parsers map. This is used when another source of tokens * is required to populate the connection currently maintained * within this parsers internal map. Any tokens that currently * exist with similar names will be overwritten by this. * * @param query this is the collection of tokens to be added */ private void add(Query query) { Set<String> keySet = query.keySet(); for(String key : keySet) { List<String> list = query.getAll(key); String first = query.get(key); if(first != null) { all.put(key, list); map.put(key, first); } } } }
/** * This method is used to insert a collection of tokens into * the parsers map. This is used when another source of tokens * is required to populate the connection currently maintained * within this parsers internal map. Any tokens that currently * exist with similar names will be overwritten by this. * * @param query this is the collection of tokens to be added */ private void add(Query query) { Set<String> keySet = query.keySet(); for(String key : keySet) { List<String> list = query.getAll(key); String first = query.get(key); if(first != null) { all.put(key, list); map.put(key, first); } } } }
/** * This method is used to insert a collection of tokens into * the parsers map. This is used when another source of tokens * is required to populate the connection currently maintained * within this parsers internal map. Any tokens that currently * exist with similar names will be overwritten by this. * * @param query this is the collection of tokens to be added */ private void add(Query query) { Set<String> keySet = query.keySet(); for(String key : keySet) { List<String> list = query.getAll(key); String first = query.get(key); if(first != null) { all.put(key, list); map.put(key, first); } } } }