|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Query
The Query
object is used to represent HTTP query
parameters. Parameters are acquired by name and can be either a
string, float, int, or boolean value. This ensures that data can
be conveniently extracted in the correct type. This stores the
parameters in a map of key value pairs. Each parameter can be
acquired using the name of the parameter, if the parameter is
named twice then all values can be acquired.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Method Summary | |
---|---|
java.util.List<java.lang.String> |
getAll(java.lang.Object name)
This method is used to acquire a List for all of
the parameter values associated with the specified name. |
boolean |
getBoolean(java.lang.Object name)
This extracts a boolean parameter for the named value. |
float |
getFloat(java.lang.Object name)
This extracts a float parameter for the named value. |
int |
getInteger(java.lang.Object name)
This extracts an integer parameter for the named value. |
java.lang.String |
toString()
This will return all parameters represented using the HTTP URL query format. |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Method Detail |
---|
java.util.List<java.lang.String> getAll(java.lang.Object name)
List
for all of
the parameter values associated with the specified name. Using
this method allows the query to expose many values taken from
the query or HTTP form posting. Typically the first value in
the list is the value from the get(String)
method
as this is the primary value from the ordered list of values.
name
- this is the name used to search for the value
int getInteger(java.lang.Object name)
name
- the name of the parameter value to retrieve
float getFloat(java.lang.Object name)
name
- the name of the parameter value to retrieve
boolean getBoolean(java.lang.Object name)
true
or
false
then those boolean values are returned.
name
- the name of the parameter value to retrieve
java.lang.String toString()
x-www-form-urlencoded
format is used to encode the attributes, see RFC 2616.
This will also encode any special characters that appear within the name and value pairs as an escaped sequence. If there are no parameters an empty string is returned.
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |