Methods Summary |
---|
public void | clear()Removes all parameters from this collection.
this.parameters = null;
|
public java.lang.Object | clone()
BasicHttpParams clone = (BasicHttpParams) super.clone();
copyParams(clone);
return clone;
|
public org.apache.http.params.HttpParams | copy()Creates a copy of these parameters.
The implementation here instantiates {@link BasicHttpParams},
then calls {@link #copyParams(HttpParams)} to populate the copy.
BasicHttpParams clone = new BasicHttpParams();
copyParams(clone);
return clone;
|
protected void | copyParams(org.apache.http.params.HttpParams target)Copies the locally defined parameters to the argument parameters.
This method is called from {@link #copy()}.
if (this.parameters == null)
return;
Iterator iter = parameters.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry me = (Map.Entry) iter.next();
if (me.getKey() instanceof String)
target.setParameter((String)me.getKey(), me.getValue());
}
|
public java.lang.Object | getParameter(java.lang.String name)
// See if the parameter has been explicitly defined
Object param = null;
if (this.parameters != null) {
param = this.parameters.get(name);
}
return param;
|
public boolean | isParameterSet(java.lang.String name)
return getParameter(name) != null;
|
public boolean | isParameterSetLocally(java.lang.String name)
return this.parameters != null && this.parameters.get(name) != null;
|
public boolean | removeParameter(java.lang.String name)
if (this.parameters == null) {
return false;
}
//this is to avoid the case in which the key has a null value
if (this.parameters.containsKey(name)) {
this.parameters.remove(name);
return true;
} else {
return false;
}
|
public org.apache.http.params.HttpParams | setParameter(java.lang.String name, java.lang.Object value)
if (this.parameters == null) {
this.parameters = new HashMap();
}
this.parameters.put(name, value);
return this;
|
public void | setParameters(java.lang.String[] names, java.lang.Object value)Assigns the value to all the parameter with the given names
for (int i = 0; i < names.length; i++) {
setParameter(names[i], value);
}
|