Record Class CookieUtil.CookieOptions
java.lang.Object
java.lang.Record
io.github.kirstenali.racore.core.utils.CookieUtil.CookieOptions
- Enclosing class:
CookieUtil
-
Constructor Summary
ConstructorsConstructorDescriptionCookieOptions(String path, boolean httpOnly, boolean secure, String sameSite, Duration maxAge) Creates an instance of aCookieOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.path()Returns the value of thepathrecord component.sameSite()Returns the value of thesameSiterecord component.booleansecure()Returns the value of thesecurerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CookieOptions
public CookieOptions(String path, boolean httpOnly, boolean secure, String sameSite, Duration maxAge) Creates an instance of aCookieOptionsrecord class.- Parameters:
path- the value for thepathrecord componenthttpOnly- the value for thehttpOnlyrecord componentsecure- the value for thesecurerecord componentsameSite- the value for thesameSiterecord componentmaxAge- the value for themaxAgerecord component
-
-
Method Details
-
withMaxAge
-
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 '=='. -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
httpOnly
public boolean httpOnly()Returns the value of thehttpOnlyrecord component.- Returns:
- the value of the
httpOnlyrecord component
-
secure
public boolean secure()Returns the value of thesecurerecord component.- Returns:
- the value of the
securerecord component
-
sameSite
Returns the value of thesameSiterecord component.- Returns:
- the value of the
sameSiterecord component
-
maxAge
Returns the value of themaxAgerecord component.- Returns:
- the value of the
maxAgerecord component
-