Class FinishedSession
java.lang.Object
com.djrapitops.plan.gathering.domain.FinishedSession
- All Implemented Interfaces:
DateHolder
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionFinishedSession(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.booleanlonglonglonggetDate()Get the date the object holds.intlonggetEnd()<T> Optional<T> getExtraData(Class<T> ofType) longintintlonggetStart()inthashCode()booleanSerialize into csv format.voidsetAsFirstSessionIfMatches(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:DateHolderGet the date the object holds.- Specified by:
getDatein 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
-