Class FinishedSession
java.lang.Object
com.djrapitops.plan.gathering.domain.FinishedSession
- All Implemented Interfaces:
DateHolder
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionFinishedSession(UUID playerUUID, ServerUUID serverUUID, long start, long end, long afkTime, DataMap extraData)
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<FinishedSession>
deserializeCSV(String serialized)
Deserialize csv format of the session.boolean
long
long
long
getDate()
Get the date the object holds.int
long
getEnd()
<T> Optional<T>
getExtraData(Class<T> ofType)
long
int
int
long
getStart()
int
hashCode()
boolean
Serialize into csv format.void
setAsFirstSessionIfMatches(Long registerDate)
toString()
-
Constructor Details
-
FinishedSession
public FinishedSession(UUID playerUUID, ServerUUID serverUUID, long start, long end, long afkTime, DataMap extraData)
-
-
Method Details
-
getPlayerUUID
-
getServerUUID
-
getStart
public long getStart() -
getEnd
public long getEnd() -
getAfkTime
public long getAfkTime() -
getLength
public long getLength() -
getActiveTime
public long getActiveTime() -
getMobKillCount
public int getMobKillCount() -
getDeathCount
public int getDeathCount() -
getPlayerKillCount
public int getPlayerKillCount() -
setAsFirstSessionIfMatches
-
isFirstSession
public boolean isFirstSession() -
getExtraData
-
getExtraData
-
getDate
public long getDate()Description copied from interface:DateHolder
Get the date the object holds.- Specified by:
getDate
in interfaceDateHolder
- Returns:
- Epoch ms - milliseconds passed since January 1st 1970.
-
deserializeCSV
Deserialize csv format of the session.- Parameters:
serialized
- Serialized version of the session- Returns:
- Proper session if the csv had 9 columns or more
- Throws:
com.google.gson.JsonSyntaxException
- if serialized format has a json syntax error
-
hashCode
public int hashCode() -
toString
-
equals
-
serializeCSV
Serialize into csv format.- Returns:
- Serialized format
-