public final class DefaultedHttpParams extends AbstractHttpParams
HttpParams
implementation that delegates resolution of a parameter
to the given default HttpParams
instance if the parameter is not
present in the local one. The state of the local collection can be mutated,
whereas the default collection is treated as read-only.Constructor and Description |
---|
DefaultedHttpParams(HttpParams local,
HttpParams defaults) |
Modifier and Type | Method and Description |
---|---|
HttpParams |
copy()
Creates a copy of the local collection with the same default
|
HttpParams |
getDefaults() |
java.lang.Object |
getParameter(java.lang.String name)
Retrieves the value of the parameter from the local collection and, if the
parameter is not set locally, delegates its resolution to the default
collection.
|
boolean |
removeParameter(java.lang.String name)
Attempts to remove the parameter from the local collection.
|
HttpParams |
setParameter(java.lang.String name,
java.lang.Object value)
Sets the parameter in the local collection.
|
getBooleanParameter, getDoubleParameter, getIntParameter, getLongParameter, isParameterFalse, isParameterTrue, setBooleanParameter, setDoubleParameter, setIntParameter, setLongParameter
public DefaultedHttpParams(HttpParams local, HttpParams defaults)
public HttpParams copy()
public java.lang.Object getParameter(java.lang.String name)
name
- the parent name.null
if the parameter is not set or if it
is explicitly set to null
HttpParams.setParameter(String, Object)
public boolean removeParameter(java.lang.String name)
name
- parameter namepublic HttpParams setParameter(java.lang.String name, java.lang.Object value)
name
- parameter namevalue
- parameter valuepublic HttpParams getDefaults()