public class HtmlParameter extends Object implements Comparable<HtmlParameter>
Modifier and Type | Class and Description |
---|---|
static class |
HtmlParameter.Flags |
static class |
HtmlParameter.Type |
Constructor and Description |
---|
HtmlParameter(HtmlParameter.Type type,
String name,
String value)
Constructs a
HtmlParameter with the given type, name, and value. |
HtmlParameter(String cookieLine)
Constructs a
HtmlParameter , with type HtmlParameter.Type.cookie , from the given cookie
line. |
Modifier and Type | Method and Description |
---|---|
void |
addFlag(String flag) |
int |
compareTo(HtmlParameter o) |
Set<String> |
getFlags() |
String |
getName() |
HtmlParameter.Type |
getType() |
String |
getValue() |
void |
setName(String name)
Sets the name.
|
void |
setType(HtmlParameter.Type type)
Sets the type.
|
void |
setValue(String value)
Sets the value.
|
String |
toString() |
public HtmlParameter(HtmlParameter.Type type, String name, String value)
HtmlParameter
with the given type, name, and value.type
- the type.name
- the name.value
- the value.IllegalArgumentException
- if any of the parameters is null
.public HtmlParameter(String cookieLine)
HtmlParameter
, with type HtmlParameter.Type.cookie
, from the given cookie
line.
The cookie line can be from a Cookie
or Set-Cookie
header.
cookieLine
- the cookie lineIllegalArgumentException
- if the given parameter is null
.public String getName()
public void setName(String name)
name
- the new name.IllegalArgumentException
- if the given parameter is null
.public String getValue()
public void setValue(String value)
value
- the new value.public HtmlParameter.Type getType()
public void setType(HtmlParameter.Type type)
type
- the new type.IllegalArgumentException
- if the given parameter is null
.public void addFlag(String flag)
public int compareTo(HtmlParameter o)
compareTo
in interface Comparable<HtmlParameter>