public class Parameter extends Couple<String,String> implements Comparable<Parameter>
Constructor and Description |
---|
Parameter()
Default constructor.
|
Parameter(String name,
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(CharSequence name,
CharSequence value)
Creates a parameter.
|
void |
encode(Appendable buffer,
CharacterSet characterSet)
Encodes the parameter and appends the result to the given buffer.
|
String |
encode(CharacterSet characterSet)
Encodes the parameter using the standard URI encoding mechanism.
|
String |
getName()
Returns the name of this parameter.
|
String |
getValue()
Returns the value.
|
void |
setName(String name)
Sets the name.
|
void |
setValue(String value)
Sets the value.
|
public static Parameter create(CharSequence name, CharSequence value)
name
- The parameter name buffer.value
- The parameter value buffer (can be null).IOException
public int compareTo(Parameter o)
compareTo
in interface Comparable<Parameter>
o
- The object to be compared.public void encode(Appendable buffer, CharacterSet characterSet) throws IOException
buffer
- The buffer to append.characterSet
- The supported character encodingIOException
public String encode(CharacterSet characterSet) throws IOException
characterSet
- The supported character encoding.IOException
public String getName()
public String getValue()
public void setName(String name)
name
- The name.public void setValue(String value)
value
- The value.Copyright © 2005–2016. All rights reserved.