Record Class Cookie
java.lang.Object
java.lang.Record
is.galia.http.Cookie
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondomain()Returns the value of thedomainrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhttpOnly()Returns the value of thehttpOnlyrecord component.maxAge()Returns the value of themaxAgerecord component.name()Returns the value of thenamerecord component.path()Returns the value of thepathrecord component.booleansecure()Returns the value of thesecurerecord component.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Cookie
public Cookie(String name, String value, String domain, String path, Duration maxAge, boolean secure, boolean httpOnly) Creates an instance of aCookierecord class.- Parameters:
name- the value for thenamerecord componentvalue- the value for thevaluerecord componentdomain- the value for thedomainrecord componentpath- the value for thepathrecord componentmaxAge- the value for themaxAgerecord componentsecure- the value for thesecurerecord componenthttpOnly- the value for thehttpOnlyrecord component
-
Cookie
- Parameters:
name- May be empty but notnull.value- May be empty but notnull.- Throws:
IllegalArgumentException- if either argument isnull.
-
Cookie
Copy constructor.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
domain
Returns the value of thedomainrecord component.- Returns:
- the value of the
domainrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
maxAge
Returns the value of themaxAgerecord component.- Returns:
- the value of the
maxAgerecord component
-
secure
public boolean secure()Returns the value of thesecurerecord component.- Returns:
- the value of the
securerecord component
-
httpOnly
public boolean httpOnly()Returns the value of thehttpOnlyrecord component.- Returns:
- the value of the
httpOnlyrecord component
-