io.undertow.server.handlers

## Class CookieImpl

- java.lang.Object
- - io.undertow.server.handlers.CookieImpl

All Implemented Interfaces:
  Cookie, Comparable

    public class CookieImpl
    extends Object
    implements Cookie

Author:
  Stuart Douglas, Richard Opalka

### Constructor Summary

Constructors
Constructor and Description
`CookieImpl(String name)`
`CookieImpl(String name, String value)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo(Object other)`
`boolean` `equals(Object other)`
`String` `getComment()`
`String` `getDomain()`
`Date` `getExpires()`
`Integer` `getMaxAge()`
`String` `getName()`
`String` `getPath()`
`String` `getSameSiteMode()`
`String` `getValue()`
`int` `getVersion()`
`int` `hashCode()`
`boolean` `isDiscard()`
`boolean` `isHttpOnly()`
`boolean` `isSameSite()`
`boolean` `isSecure()`
`Cookie` `setComment(String comment)`
`CookieImpl` `setDiscard(boolean discard)`
`CookieImpl` `setDomain(String domain)`
`CookieImpl` `setExpires(Date expires)`
`CookieImpl` `setHttpOnly(boolean httpOnly)`
`CookieImpl` `setMaxAge(Integer maxAge)`
`CookieImpl` `setPath(String path)`
`Cookie` `setSameSite(boolean sameSite)`
`Cookie` `setSameSiteMode(String mode)`
`CookieImpl` `setSecure(boolean secure)`
`CookieImpl` `setValue(String value)`
`CookieImpl` `setVersion(int version)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### CookieImpl

    public CookieImpl(String name,
                      String value)

#### CookieImpl

    public CookieImpl(String name)

### Method Detail

#### getName

    public String getName()

Specified by:
  `getName` in interface `Cookie`

#### getValue

    public String getValue()

Specified by:
  `getValue` in interface `Cookie`

#### setValue

    public CookieImpl setValue(String value)

Specified by:
  `setValue` in interface `Cookie`

#### getPath

    public String getPath()

Specified by:
  `getPath` in interface `Cookie`

#### setPath

    public CookieImpl setPath(String path)

Specified by:
  `setPath` in interface `Cookie`

#### getDomain

    public String getDomain()

Specified by:
  `getDomain` in interface `Cookie`

#### setDomain

    public CookieImpl setDomain(String domain)

Specified by:
  `setDomain` in interface `Cookie`

#### getMaxAge

    public Integer getMaxAge()

Specified by:
  `getMaxAge` in interface `Cookie`

#### setMaxAge

    public CookieImpl setMaxAge(Integer maxAge)

Specified by:
  `setMaxAge` in interface `Cookie`

#### isDiscard

    public boolean isDiscard()

Specified by:
  `isDiscard` in interface `Cookie`

#### setDiscard

    public CookieImpl setDiscard(boolean discard)

Specified by:
  `setDiscard` in interface `Cookie`

#### isSecure

    public boolean isSecure()

Specified by:
  `isSecure` in interface `Cookie`

#### setSecure

    public CookieImpl setSecure(boolean secure)

Specified by:
  `setSecure` in interface `Cookie`

#### getVersion

    public int getVersion()

Specified by:
  `getVersion` in interface `Cookie`

#### setVersion

    public CookieImpl setVersion(int version)

Specified by:
  `setVersion` in interface `Cookie`

#### isHttpOnly

    public boolean isHttpOnly()

Specified by:
  `isHttpOnly` in interface `Cookie`

#### setHttpOnly

    public CookieImpl setHttpOnly(boolean httpOnly)

Specified by:
  `setHttpOnly` in interface `Cookie`

#### getExpires

    public Date getExpires()

Specified by:
  `getExpires` in interface `Cookie`

#### setExpires

    public CookieImpl setExpires(Date expires)

Specified by:
  `setExpires` in interface `Cookie`

#### getComment

    public String getComment()

Specified by:
  `getComment` in interface `Cookie`

#### setComment

    public Cookie setComment(String comment)

Specified by:
  `setComment` in interface `Cookie`

#### isSameSite

    public boolean isSameSite()

Specified by:
  `isSameSite` in interface `Cookie`

#### setSameSite

    public Cookie setSameSite(boolean sameSite)

Specified by:
  `setSameSite` in interface `Cookie`

#### getSameSiteMode

    public String getSameSiteMode()

Specified by:
  `getSameSiteMode` in interface `Cookie`

#### setSameSiteMode

    public Cookie setSameSiteMode(String mode)

Specified by:
  `setSameSiteMode` in interface `Cookie`

#### hashCode

    public final int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public final boolean equals(Object other)

Overrides:
  `equals` in class `Object`

#### compareTo

    public final int compareTo(Object other)

Specified by:
  `compareTo` in interface `Cookie`
Specified by:
  `compareTo` in interface `Comparable`

#### toString

    public final String toString()

Overrides:
  `toString` in class `Object`