Package org.apache.http.params
Class AbstractHttpParams
java.lang.Object
org.apache.http.params.AbstractHttpParams
- All Implemented Interfaces:
HttpParams
- Direct Known Subclasses:
BasicHttpParams,ClientParamsStack,DefaultedHttpParams
public abstract class AbstractHttpParams extends Object implements HttpParams
Abstract base class for parameter collections.
Type specific setters and getters are mapped to the abstract,
generic getters and setters.
- Version:
- $Revision: 542224 $
- Author:
- Oleg Kalnichevski, Roland Weber
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractHttpParams()Instantiates parameters. -
Method Summary
Modifier and Type Method Description booleangetBooleanParameter(String name, boolean defaultValue)Returns aBooleanparameter value with the given name.doublegetDoubleParameter(String name, double defaultValue)Returns aDoubleparameter value with the given name.intgetIntParameter(String name, int defaultValue)Returns anIntegerparameter value with the given name.longgetLongParameter(String name, long defaultValue)Returns aLongparameter value with the given name.booleanisParameterFalse(String name)Checks if a boolean parameter is not set orfalse.booleanisParameterTrue(String name)Checks if a boolean parameter is set totrue.HttpParamssetBooleanParameter(String name, boolean value)Assigns aBooleanto the parameter with the given nameHttpParamssetDoubleParameter(String name, double value)Assigns aDoubleto the parameter with the given nameHttpParamssetIntParameter(String name, int value)Assigns anIntegerto the parameter with the given nameHttpParamssetLongParameter(String name, long value)Assigns aLongto the parameter with the given nameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.http.params.HttpParams
copy, getParameter, removeParameter, setParameter
-
Constructor Details
-
AbstractHttpParams
protected AbstractHttpParams()Instantiates parameters.
-
-
Method Details
-
getLongParameter
Description copied from interface:HttpParamsReturns aLongparameter value with the given name. If the parameter is not explicitly set, the default value is returned.- Specified by:
getLongParameterin interfaceHttpParams- Parameters:
name- the parent name.defaultValue- the default value.- Returns:
- a
Longthat represents the value of the parameter. - See Also:
HttpParams.setLongParameter(String, long)
-
setLongParameter
Description copied from interface:HttpParamsAssigns aLongto the parameter with the given name- Specified by:
setLongParameterin interfaceHttpParams- Parameters:
name- parameter namevalue- parameter value
-
getIntParameter
Description copied from interface:HttpParamsReturns anIntegerparameter value with the given name. If the parameter is not explicitly set, the default value is returned.- Specified by:
getIntParameterin interfaceHttpParams- Parameters:
name- the parent name.defaultValue- the default value.- Returns:
- a
Integerthat represents the value of the parameter. - See Also:
HttpParams.setIntParameter(String, int)
-
setIntParameter
Description copied from interface:HttpParamsAssigns anIntegerto the parameter with the given name- Specified by:
setIntParameterin interfaceHttpParams- Parameters:
name- parameter namevalue- parameter value
-
getDoubleParameter
Description copied from interface:HttpParamsReturns aDoubleparameter value with the given name. If the parameter is not explicitly set, the default value is returned.- Specified by:
getDoubleParameterin interfaceHttpParams- Parameters:
name- the parent name.defaultValue- the default value.- Returns:
- a
Doublethat represents the value of the parameter. - See Also:
HttpParams.setDoubleParameter(String, double)
-
setDoubleParameter
Description copied from interface:HttpParamsAssigns aDoubleto the parameter with the given name- Specified by:
setDoubleParameterin interfaceHttpParams- Parameters:
name- parameter namevalue- parameter value
-
getBooleanParameter
Description copied from interface:HttpParamsReturns aBooleanparameter value with the given name. If the parameter is not explicitly set, the default value is returned.- Specified by:
getBooleanParameterin interfaceHttpParams- Parameters:
name- the parent name.defaultValue- the default value.- Returns:
- a
Booleanthat represents the value of the parameter. - See Also:
HttpParams.setBooleanParameter(String, boolean)
-
setBooleanParameter
Description copied from interface:HttpParamsAssigns aBooleanto the parameter with the given name- Specified by:
setBooleanParameterin interfaceHttpParams- Parameters:
name- parameter namevalue- parameter value
-
isParameterTrue
Description copied from interface:HttpParamsChecks if a boolean parameter is set totrue.- Specified by:
isParameterTruein interfaceHttpParams- Parameters:
name- parameter name- Returns:
- true if the parameter is set to value true,
false if it is not set or set to
false
-
isParameterFalse
Description copied from interface:HttpParamsChecks if a boolean parameter is not set orfalse.- Specified by:
isParameterFalsein interfaceHttpParams- Parameters:
name- parameter name- Returns:
- true if the parameter is either not set or
set to value false,
false if it is set to
true
-