public class QueryParamsMap extends Object
Modifier | Constructor and Description |
---|---|
protected |
QueryParamsMap() |
|
QueryParamsMap(javax.servlet.http.HttpServletRequest request)
Creates a new QueryParamsMap from an HttpServletRequest.
|
protected |
QueryParamsMap(Map<String,String[]> params)
Constructor
|
protected |
QueryParamsMap(String key,
String... values)
Parses the key and creates the child QueryParamMaps
user[info][name] creates 3 nested QueryParamMaps.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
booleanValue() |
protected static String |
cleanKey(String group) |
Double |
doubleValue() |
Float |
floatValue() |
QueryParamsMap |
get(String... keys)
Returns an element from the specified key.
|
boolean |
hasKey(String key) |
boolean |
hasKeys() |
boolean |
hasValue() |
Integer |
integerValue() |
protected void |
loadKeys(String key,
String[] value)
loads keys
|
protected void |
loadQueryString(Map<String,String[]> params)
loads query string
|
Long |
longValue() |
protected String[] |
parseKey(String key) |
Map<String,String[]> |
toMap() |
String |
value()
Returns the value for this key.
|
String |
value(String... keys)
Returns the value for that key.
|
String[] |
values() |
public QueryParamsMap(javax.servlet.http.HttpServletRequest request)
request
- the servlet requestprotected QueryParamsMap()
protected QueryParamsMap(String key, String... values)
key
- The key in the formar fo key1[key2][key3] (for example:
user[info][name]).values
- the valuesprotected final void loadQueryString(Map<String,String[]> params)
params
- the parametersprotected final void loadKeys(String key, String[] value)
key
- the keyvalue
- the valuespublic QueryParamsMap get(String... keys)
keys
- The parameter nested key(s)public String value()
public String value(String... keys)
get("user").get("name").value()
get("user").value("name")
keys
- the key(s)public boolean hasKeys()
public boolean hasKey(String key)
public boolean hasValue()
public Boolean booleanValue()
public Integer integerValue()
public Long longValue()
public Float floatValue()
public Double doubleValue()
public String[] values()
Copyright © 2019. All rights reserved.