|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.servlet.util.QueryBuilder
public class QueryBuilder
| Constructor Summary | |
|---|---|
QueryBuilder()
|
|
| Method Summary | |
|---|---|
QueryBuilder |
add(String key,
Object val)
Adds the given value to the parameter mapping under key adding to any current value. |
QueryBuilder |
addAll(javax.servlet.http.HttpServletRequest req)
Adds all the parameters in req to the parameters being constructed. |
Collection<String> |
get(String key)
Returns the current values for key or an empty collection if there isn't a value. |
String |
getFirst(String key)
Retrieve the first value for the given key, or null if the key is not defined. |
String |
getOnly(String key)
Retrieve the only value for the given key, or null if it's not defined. |
String |
getOnly(String key,
String defaultValue)
Retrieve the only value for the given key, or the default value if it's not defined. |
String |
toString()
Returns the query in this builder. |
String |
toUrl(String base)
Appends the query in this builder to the given String with a question mark. |
String |
toUrl(StringBuilder base)
Appends the query in this builder to the given StringBuilder with a question mark. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public QueryBuilder()
| Method Detail |
|---|
public String getOnly(String key)
public String getOnly(String key,
String defaultValue)
public String getFirst(String key)
public Collection<String> get(String key)
public QueryBuilder add(String key,
Object val)
String.valueOf(java.lang.Object) is called on val to turn it into a string.
public QueryBuilder addAll(javax.servlet.http.HttpServletRequest req)
req to the parameters being constructed.
public String toUrl(StringBuilder base)
public String toUrl(String base)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||