public class Session extends Object implements Serializable
| Constructor and Description |
|---|
Session() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Long |
getDuration()
Session duration in millis
|
String |
getId()
A unique identifier for the session.
|
String |
getStartTimestamp()
The date and time when the session began.
|
String |
getStopTimestamp()
The date and time when the session ended.
|
int |
hashCode() |
void |
setDuration(Long duration)
Session duration in millis
|
void |
setId(String id)
A unique identifier for the session.
|
void |
setStartTimestamp(String startTimestamp)
The date and time when the session began.
|
void |
setStopTimestamp(String stopTimestamp)
The date and time when the session ended.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Session |
withDuration(Long duration)
Session duration in millis
|
Session |
withId(String id)
A unique identifier for the session.
|
Session |
withStartTimestamp(String startTimestamp)
The date and time when the session began.
|
Session |
withStopTimestamp(String stopTimestamp)
The date and time when the session ended.
|
public Long getDuration()
public void setDuration(Long duration)
duration - Session duration in millispublic Session withDuration(Long duration)
Returns a reference to this object so that method calls can be chained together.
duration - Session duration in millispublic String getId()
public void setId(String id)
id - A unique identifier for the session.public Session withId(String id)
Returns a reference to this object so that method calls can be chained together.
id - A unique identifier for the session.public String getStartTimestamp()
public void setStartTimestamp(String startTimestamp)
startTimestamp - The date and time when the session began.public Session withStartTimestamp(String startTimestamp)
Returns a reference to this object so that method calls can be chained together.
startTimestamp - The date and time when the session began.public String getStopTimestamp()
public void setStopTimestamp(String stopTimestamp)
stopTimestamp - The date and time when the session ended.public Session withStopTimestamp(String stopTimestamp)
Returns a reference to this object so that method calls can be chained together.
stopTimestamp - The date and time when the session ended.public String toString()
toString in class ObjectObject.toString()Copyright © 2018. All rights reserved.