org.apache.velocity.tools.view

## Class CookieTool.SugarCookie

- java.lang.Object
- - javax.servlet.http.Cookie
  - - org.apache.velocity.tools.view.CookieTool.SugarCookie

All Implemented Interfaces:
  Serializable, Cloneable

Enclosing class:
  CookieTool

    public static class CookieTool.SugarCookie
    extends javax.servlet.http.Cookie

Extends `Cookie` to add some fluid API sugar and a toString() method that renders the Cookie's value instead of the usual Object.toString() shenanigans.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`SugarCookie(javax.servlet.http.Cookie c)`
`SugarCookie(String name, String value)`

### Method Summary

All Methods Instance Methods Concrete Methods
`CookieTool.SugarCookie` `comment(Object obj)`
`CookieTool.SugarCookie` `domain(Object obj)`
`javax.servlet.http.Cookie` `getPlain()`
`CookieTool.SugarCookie` `maxAge(Object obj)`
`CookieTool.SugarCookie` `path(Object obj)`
`CookieTool.SugarCookie` `secure(Object obj)`
`String` `toString()`
`CookieTool.SugarCookie` `value(Object obj)`
`CookieTool.SugarCookie` `version(Object obj)`

### Methods inherited from class javax.servlet.http.Cookie

`clone, getComment, getDomain, getMaxAge, getName, getPath, getSecure, getValue, getVersion, isHttpOnly, setComment, setDomain, setHttpOnly, setMaxAge, setPath, setSecure, setValue, setVersion`

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

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SugarCookie

    public SugarCookie(javax.servlet.http.Cookie c)

#### SugarCookie

    public SugarCookie(String name,
                       String value)

### Method Detail

#### value

    public CookieTool.SugarCookie value(Object obj)

#### maxAge

    public CookieTool.SugarCookie maxAge(Object obj)

#### comment

    public CookieTool.SugarCookie comment(Object obj)

#### domain

    public CookieTool.SugarCookie domain(Object obj)

#### path

    public CookieTool.SugarCookie path(Object obj)

#### version

    public CookieTool.SugarCookie version(Object obj)

#### secure

    public CookieTool.SugarCookie secure(Object obj)

#### getPlain

    public javax.servlet.http.Cookie getPlain()

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`