Record Class NinjaCookie
java.lang.Object
java.lang.Record
org.ninjax.core.NinjaCookie
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomment()Returns the value of thecommentrecord component.domain()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.intmaxAge()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.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
NinjaCookie
public NinjaCookie(String name, String value, Optional<String> comment, Optional<String> domain, int maxAge, Optional<String> path, boolean secure, boolean httpOnly) Creates an instance of aNinjaCookierecord class.- Parameters:
name- the value for thenamerecord componentvalue- the value for thevaluerecord componentcomment- the value for thecommentrecord componentdomain- the value for thedomainrecord componentmaxAge- the value for themaxAgerecord componentpath- the value for thepathrecord componentsecure- the value for thesecurerecord componenthttpOnly- the value for thehttpOnlyrecord component
-
-
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
-
comment
-
domain
-
maxAge
public int maxAge()Returns the value of themaxAgerecord component.- Returns:
- the value of the
maxAgerecord component
-
path
-
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
-