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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfindLonelyJoins(List<Long> joinDates) getOnlineOn(long date) booleanisServerOnline(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, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.NavigableMap
reversedMethods inherited from interface java.util.SequencedMap
sequencedEntrySet, sequencedKeySet, sequencedValues
-
Constructor Details
-
PlayersOnlineResolver
-
-
Method Details
-
getOnlineOn
-
findLonelyJoins
-
isServerOnline
public boolean isServerOnline(long date, long timeLimit)
-