Class PlayersOnlineResolver
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Long,
,Integer> NavigableMap<Long,
,Integer> SortedMap<Long,
Integer>
Resolves dates into players online numbers with a help of a NavigableMap.
Time Complexity of O(n / 2) with the use of TreeMap.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
findLonelyJoins
(List<Long> joinDates) getOnlineOn
(long date) boolean
isServerOnline
(long date, long timeLimit) Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, merge, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
-
Constructor Details
-
PlayersOnlineResolver
-
-
Method Details
-
getOnlineOn
-
findLonelyJoins
-
isServerOnline
public boolean isServerOnline(long date, long timeLimit)
-