Class SessionsMutator
java.lang.Object
com.djrapitops.plan.delivery.domain.mutators.SessionsMutator
Mutator for a list of Sessions.
Can be used to get properties of a large number of sessions easily.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionall()
int
count()
filterBy
(Predicate<FinishedSession> predicate) filterPlayedOnServer
(ServerUUID serverUUID) filterSessionsBetween
(long after, long before) static SessionsMutator
forContainer
(DataContainer container) boolean
playedBetween
(long after, long before) sort
(Comparator<DateHolder> sessionComparator) static Map
<UUID, List<FinishedSession>> sortByPlayers
(List<FinishedSession> sessions) static Map
<ServerUUID, List<FinishedSession>> sortByServers
(List<FinishedSession> sessions) static Map
<ServerUUID, TreeMap<Long, FinishedSession>> sortByServersToMaps
(List<FinishedSession> sessions) long
long
double
toAveragePlayersOnline
(PlayersOnlineResolver playersOnlineResolver) long
int
long
long
long
int
int
int
toPlayerNameJSONMaps
(Graphs graphs, WorldAliasSettings worldAliasSettings, Formatters formatters) long
toServerNameJSONMaps
(Graphs graphs, WorldAliasSettings worldAliasSettings, Formatters formatters) int
-
Constructor Details
-
SessionsMutator
-
-
Method Details
-
forContainer
-
sortByPlayers
-
sort
-
sortByServers
-
filterSessionsBetween
-
sortByServersToMaps
public static Map<ServerUUID,TreeMap<Long, sortByServersToMapsFinishedSession>> (List<FinishedSession> sessions) -
all
-
onlineTimeSegments
-
filterPlayedOnServer
-
toDateHoldersMutator
-
toTotalWorldTimes
-
toPlayerKillList
-
toMobKillCount
public int toMobKillCount() -
toDeathCount
public int toDeathCount() -
toPlaytime
public long toPlaytime() -
toAfkTime
public long toAfkTime() -
toActivePlaytime
public long toActivePlaytime() -
toLastSeen
public long toLastSeen() -
toLongestSessionLength
public long toLongestSessionLength() -
toAverageSessionLength
public long toAverageSessionLength() -
count
public int count() -
toPlayerKillCount
public int toPlayerKillCount() -
playedBetween
public boolean playedBetween(long after, long before) -
toUniquePlayers
public int toUniquePlayers() -
filterBy
-
toMedianSessionLength
public long toMedianSessionLength() -
toPlayerDeathCount
public int toPlayerDeathCount() -
toSessionStarts
-
toAveragePlayersOnline
-
toPlayerNameJSONMaps
public List<Map<String,Object>> toPlayerNameJSONMaps(Graphs graphs, WorldAliasSettings worldAliasSettings, Formatters formatters) -
toServerNameJSONMaps
public List<Map<String,Object>> toServerNameJSONMaps(Graphs graphs, WorldAliasSettings worldAliasSettings, Formatters formatters) -
latestSession
-
previousSession
-