public class Cookie extends java.lang.Object implements NamedValue<java.lang.String>
Request.getCookies()
method.CookieSetting
class instead.Request.getCookies()
,
User Guide - Getting parameter valuesConstructor and Description |
---|
Cookie()
Default constructor.
|
Cookie(int version,
java.lang.String name,
java.lang.String value)
Constructor.
|
Cookie(int version,
java.lang.String name,
java.lang.String value,
java.lang.String path,
java.lang.String domain)
Constructor.
|
Cookie(java.lang.String name,
java.lang.String value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDomain()
Returns the domain name.
|
java.lang.String |
getName()
Returns the name.
|
java.lang.String |
getPath()
Returns the validity path.
|
java.lang.String |
getValue()
Returns the value.
|
int |
getVersion()
Returns the cookie specification version.
|
int |
hashCode() |
void |
setDomain(java.lang.String domain)
Sets the domain name.
|
void |
setName(java.lang.String name)
Sets the name.
|
void |
setPath(java.lang.String path)
Sets the validity path.
|
void |
setValue(java.lang.String value)
Sets the value.
|
void |
setVersion(int version)
Sets the cookie specification version.
|
java.lang.String |
toString() |
public Cookie()
public Cookie(int version, java.lang.String name, java.lang.String value)
version
- The version number.name
- The name.value
- The value.public Cookie(int version, java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain)
version
- The version number.name
- The name.value
- The value.path
- The validity path.domain
- The domain name.public Cookie(java.lang.String name, java.lang.String value)
name
- The name.value
- The value.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getDomain()
public java.lang.String getName()
getName
in interface NamedValue<java.lang.String>
public java.lang.String getPath()
public java.lang.String getValue()
getValue
in interface NamedValue<java.lang.String>
public int getVersion()
public int hashCode()
hashCode
in class java.lang.Object
public void setDomain(java.lang.String domain)
domain
- The domain name.public void setName(java.lang.String name)
name
- The name.public void setPath(java.lang.String path)
path
- The validity path.public void setValue(java.lang.String value)
setValue
in interface NamedValue<java.lang.String>
value
- The value.public void setVersion(int version)
version
- The cookie specification version.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2024 Restlet.