com.holonplatform.http.internal

## Class HttpCookie

- java.lang.Object
- - com.holonplatform.http.internal.HttpCookie

- All Implemented Interfaces:
    Cookie, Serializable

      public class HttpCookie
      extends Object
      implements Cookie

  Default `Cookie` implementation.
  Since:
    5.0.0
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HttpCookie.CookieBuilder` Default `Cookie` builder.

    - ### Nested classes/interfaces inherited from interface com.holonplatform.http.Cookie

      `Cookie.Builder`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.http.Cookie

      `DEFAULT_VERSION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HttpCookie(String name, String value)` Constructor with `Cookie.DEFAULT_VERSION` and no path/domain
    `HttpCookie(String name, String value, int version, String path, String domain)` Constructor
    `HttpCookie(String name, String value, String path, String domain)` Constructor with `Cookie.DEFAULT_VERSION`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `String` | `getDomain()` Get the domain of the cookie
    `String` | `getName()` Get the name of the cookie
    `String` | `getPath()` Get the path of the cookie
    `String` | `getValue()` Get the value of the cookie
    `int` | `getVersion()` Get the version of the cookie
    `int` | `hashCode()`
    `void` | `setDomain(String domain)` Set the cookie domain
    `void` | `setName(String name)` Set the cookie name
    `void` | `setPath(String path)` Set the cookie path
    `void` | `setValue(String value)` Set the cookie value
    `void` | `setVersion(int version)` Set the cookie version
    `String` | `toString()`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.http.Cookie

      `builder`

- - ### Constructor Detail

    - #### HttpCookie

          public HttpCookie(String name,
                            String value)

      Constructor with `Cookie.DEFAULT_VERSION` and no path/domain
      Parameters:
        `name` - Name
        `value` - Value

    - #### HttpCookie

          public HttpCookie(String name,
                            String value,
                            String path,
                            String domain)

      Constructor with `Cookie.DEFAULT_VERSION`
      Parameters:
        `name` - Name
        `value` - Value
        `path` - Path
        `domain` - Domain

    - #### HttpCookie

          public HttpCookie(String name,
                            String value,
                            int version,
                            String path,
                            String domain)

      Constructor
      Parameters:
        `name` - Name
        `value` - Value
        `version` - Version
        `path` - Path
        `domain` - Domain

  - ### Method Detail

    - #### getName

          public String getName()

      Description copied from interface: `Cookie`
      Get the name of the cookie
      Specified by:
        `getName` in interface `Cookie`
      Returns:
        the cookie name

    - #### getValue

          public String getValue()

      Description copied from interface: `Cookie`
      Get the value of the cookie
      Specified by:
        `getValue` in interface `Cookie`
      Returns:
        the cookie value

    - #### getVersion

          public int getVersion()

      Description copied from interface: `Cookie`
      Get the version of the cookie
      Specified by:
        `getVersion` in interface `Cookie`
      Returns:
        the cookie version

    - #### getDomain

          public String getDomain()

      Description copied from interface: `Cookie`
      Get the domain of the cookie
      Specified by:
        `getDomain` in interface `Cookie`
      Returns:
        the cookie domain

    - #### getPath

          public String getPath()

      Description copied from interface: `Cookie`
      Get the path of the cookie
      Specified by:
        `getPath` in interface `Cookie`
      Returns:
        the cookie path

    - #### setName

          public void setName(String name)

      Set the cookie name
      Parameters:
        `name` - the name to set (not null)

    - #### setValue

          public void setValue(String value)

      Set the cookie value
      Parameters:
        `value` - the value to set

    - #### setVersion

          public void setVersion(int version)

      Set the cookie version
      Parameters:
        `version` - the version to set

    - #### setPath

          public void setPath(String path)

      Set the cookie path
      Parameters:
        `path` - the path to set

    - #### setDomain

          public void setDomain(String domain)

      Set the cookie domain
      Parameters:
        `domain` - the domain to set

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2019 The Holon Platform. All rights reserved.