public static class Cookie.Builder extends Cookie.AbstractCookieBuilder<Cookie.Builder>
Cookie
builder class.
Cookie builder provides methods that let you conveniently configure and subsequently build a new
Cookie
instance.
Cookie cookie = new Cookie.Builder("name") .path("/") .domain("domain.com") .build();
Constructor and Description |
---|
Builder(java.lang.String name)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
Cookie |
build()
Build a new
Cookie instance using all the configuration previously specified in this builder. |
domain, path, value, version
public Builder(java.lang.String name)
name
- the name of the cookie.public Cookie build()
Cookie.AbstractCookieBuilder
Cookie
instance using all the configuration previously specified in this builder.build
in class Cookie.AbstractCookieBuilder<Cookie.Builder>
Cookie
instance.