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 thedomain
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
httpOnly()
Returns the value of thehttpOnly
record component.maxAge()
Returns the value of themaxAge
record component.name()
Returns the value of thename
record component.path()
Returns the value of thepath
record component.boolean
secure()
Returns the value of thesecure
record component.toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
Cookie
public Cookie(String name, String value, String domain, String path, Duration maxAge, boolean secure, boolean httpOnly) Creates an instance of aCookie
record class.- Parameters:
name
- the value for thename
record componentvalue
- the value for thevalue
record componentdomain
- the value for thedomain
record componentpath
- the value for thepath
record componentmaxAge
- the value for themaxAge
record componentsecure
- the value for thesecure
record componenthttpOnly
- the value for thehttpOnly
record 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 thecompare
method from their corresponding wrapper classes. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
value
Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-
domain
Returns the value of thedomain
record component.- Returns:
- the value of the
domain
record component
-
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
maxAge
Returns the value of themaxAge
record component.- Returns:
- the value of the
maxAge
record component
-
secure
public boolean secure()Returns the value of thesecure
record component.- Returns:
- the value of the
secure
record component
-
httpOnly
public boolean httpOnly()Returns the value of thehttpOnly
record component.- Returns:
- the value of the
httpOnly
record component
-