Class PlayersMutator

java.lang.Object
com.djrapitops.plan.delivery.domain.mutators.PlayersMutator

public class PlayersMutator extends Object
Mutator for a bunch of PlayerContainers.
  • Constructor Details Link icon

  • Method Details Link icon

    • copyOf Link icon

      public static PlayersMutator copyOf(PlayersMutator mutator)
    • filterBy Link icon

      public <T extends Predicate<PlayerContainer>> PlayersMutator filterBy(T by)
    • filterPlayedBetween Link icon

      public PlayersMutator filterPlayedBetween(long after, long before)
    • filterRegisteredBetween Link icon

      public PlayersMutator filterRegisteredBetween(long after, long before)
    • filterRetained Link icon

      public PlayersMutator filterRetained(long after, long before)
    • filterActive Link icon

      public PlayersMutator filterActive(long date, long msThreshold, double limit)
    • filterPlayedOnServer Link icon

      public PlayersMutator filterPlayedOnServer(ServerUUID serverUUID)
    • all Link icon

      public List<PlayerContainer> all()
    • registerDates Link icon

      public List<Long> registerDates()
    • getGeolocations Link icon

      public List<String> getGeolocations()
    • getPingPerCountry Link icon

      public Map<String,List<Ping>> getPingPerCountry(ServerUUID serverUUID)
    • toActivityDataMap Link icon

      public TreeMap<Long,Map<String,Set<UUID>>> toActivityDataMap(long date, long msThreshold)
    • count Link icon

      public int count()
    • averageNewPerDay Link icon

      public int averageNewPerDay(TimeZone timeZone)
    • newPerDay Link icon

      public TreeMap<Long,Integer> newPerDay(TimeZone timeZone)
    • compareAndFindThoseLikelyToBeRetained Link icon

      public PlayersMutator compareAndFindThoseLikelyToBeRetained(Iterable<PlayerContainer> compareTo, long dateLimit, PlayersOnlineResolver onlineResolver, long activityMsThreshold)
      Compares players in the mutator to other players in terms of player retention.
      Parameters:
      compareTo - Players to compare to.
      dateLimit - Epoch ms back limit, if the player registered after this their value is not used.
      onlineResolver - Thing that figures out how many players were online at different dates.
      activityMsThreshold - Threshold for activity index calculation.
      Returns:
      Mutator containing the players that are considered to be retained.
      Throws:
      IllegalStateException - If all players are rejected due to dateLimit.
    • getSessions Link icon

      public List<FinishedSession> getSessions()
    • uuids Link icon

      public List<UUID> uuids()
    • operators Link icon

      public List<PlayerContainer> operators()
    • pings Link icon

      public List<Ping> pings()