Package org.restlet.data
Class Parameter
java.lang.Object
org.restlet.data.Parameter
- All Implemented Interfaces:
Comparable<Parameter>,NamedValue<String>
Multi-usage parameter. Note that the name and value properties are thread
safe, stored in volatile members.
- Author:
- Jerome Louvel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic Parametercreate(CharSequence name, CharSequence value) Creates a parameter.Creates a series that includes the current parameter as the initial entry.voidencode(Appendable buffer, CharacterSet characterSet) Encodes the parameter into the target buffer.encode(CharacterSet characterSet) Encodes the parameter as a string.booleangetName()Returns the name of this parameter.getValue()Returns the value.inthashCode()voidvoidSets the value.toString()
-
Constructor Details
-
Parameter
public Parameter()Default constructor. -
Parameter
Preferred constructor.- Parameters:
name- The name.value- The value.
-
-
Method Details
-
createSeries
Creates a series that includes the current parameter as the initial entry.- Returns:
- A series that includes the current parameter as the initial entry.
-
create
Creates a parameter.- Parameters:
name- The parameter name buffer.value- The parameter value buffer (can be null).- Returns:
- The created parameter.
- Throws:
IOException
-
compareTo
- Specified by:
compareToin interfaceComparable<Parameter>
-
encode
Encodes the parameter into the target buffer.- Parameters:
buffer- The target buffer.characterSet- The character set to use.- Throws:
IOException
-
encode
Encodes the parameter as a string.- Parameters:
characterSet- The character set to use.- Returns:
- The encoded string?
- Throws:
IOException
-
equals
-
getName
Description copied from interface:NamedValueReturns the name of this parameter.- Specified by:
getNamein interfaceNamedValue<String>- Returns:
- The name of this parameter.
-
getValue
Description copied from interface:NamedValueReturns the value.- Specified by:
getValuein interfaceNamedValue<String>- Returns:
- The value.
-
hashCode
public int hashCode() -
setName
-
setValue
Description copied from interface:NamedValueSets the value.- Specified by:
setValuein interfaceNamedValue<String>- Parameters:
value- The value.
-
toString
-