public class Parameter extends Couple<java.lang.String,java.lang.String> implements java.lang.Comparable<Parameter>
Constructor and Description |
---|
Parameter()
Default constructor.
|
Parameter(java.lang.String name,
java.lang.String value)
Preferred constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Parameter o)
Compares this object with the specified object for order.
|
static Parameter |
create(java.lang.CharSequence name,
java.lang.CharSequence value)
Creates a parameter.
|
void |
encode(java.lang.Appendable buffer,
CharacterSet characterSet)
Encodes the parameter and appends the result to the given buffer.
|
java.lang.String |
encode(CharacterSet characterSet)
Encodes the parameter using the standard URI encoding mechanism.
|
java.lang.String |
getName()
Returns the name of this parameter.
|
java.lang.String |
getValue()
Returns the value.
|
void |
setName(java.lang.String name)
Sets the name.
|
void |
setValue(java.lang.String value)
Sets the value.
|
public Parameter()
public Parameter(java.lang.String name, java.lang.String value)
name
- The name.value
- The value.public static Parameter create(java.lang.CharSequence name, java.lang.CharSequence value)
name
- The parameter name buffer.value
- The parameter value buffer (can be null).java.io.IOException
public int compareTo(Parameter o)
compareTo
in interface java.lang.Comparable<Parameter>
o
- The object to be compared.public void encode(java.lang.Appendable buffer, CharacterSet characterSet) throws java.io.IOException
buffer
- The buffer to append.characterSet
- The supported character encodingjava.io.IOException
public java.lang.String encode(CharacterSet characterSet) throws java.io.IOException
characterSet
- The supported character encoding.java.io.IOException
public java.lang.String getName()
public java.lang.String getValue()
public void setName(java.lang.String name)
name
- The name.public void setValue(java.lang.String value)
value
- The value.Copyright © 2005-2012. All Rights Reserved.