Class Cookie


  • public class Cookie
    extends Object
    • Constructor Detail

      • Cookie

        public Cookie​(String name,
                      String value,
                      String domain,
                      String path,
                      Date expiry,
                      boolean isSecure)
        Parameters:
        name - the name of the cookie. May not be null or an empty string
        value - the cookie value. May not be null
        domain - the domain the cookie is visible to
        path - the path the cookie is visible to. If left blank or set to null, will be set to "/"
        expiry - the cookie's expiration date. May be null
    • Method Detail

      • getName

        public String getName()
      • getValue

        public String getValue()
      • getDomain

        public String getDomain()
      • getPath

        public String getPath()
      • getExpiry

        public Date getExpiry()
      • isSecure

        public boolean isSecure()
      • equals

        public boolean equals​(Object o)
        Two cookies are equal if the name and value match
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object