Class PlayersOnlineResolver
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Long,
,Integer> NavigableMap<Long,
,Integer> SequencedMap<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,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
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, putFirst, putIfAbsent, putLast, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.NavigableMap
reversed
Methods inherited from interface java.util.SequencedMap
sequencedEntrySet, sequencedKeySet, sequencedValues
-
Constructor Details
-
PlayersOnlineResolver
-
-
Method Details
-
getOnlineOn
-
findLonelyJoins
-
isServerOnline
public boolean isServerOnline(long date, long timeLimit)
-