Package dev.mccue.jdk.httpserver.session
Record Class Session
java.lang.Object
java.lang.Record
dev.mccue.jdk.httpserver.session.Session
-
Constructor Summary
ConstructorsConstructorDescriptionSession()Session(SessionKey key, SessionData data) Creates an instance of aSessionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Session
Creates an instance of aSessionrecord class.- Parameters:
key- the value for thekeyrecord componentdata- the value for thedatarecord component
-
Session
public Session()
-
-
Method Details
-
update
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-