Class HistoricalLinkedHashMap<K,V>
java.lang.Object
org.opentrafficsim.core.perception.AbstractHistorical<K,AbstractHistoricalMap.EventMap<K,V,M>>
org.opentrafficsim.core.perception.collections.AbstractHistoricalMap<K,V,LinkedHashMap<K,V>>
org.opentrafficsim.core.perception.collections.HistoricalLinkedHashMap<K,V>
- Type Parameters:
K- key typeV- value type
- All Implemented Interfaces:
Map<K,V>,HistoricalMap<K,V>,HistoryManager.HistoricalElement
public class HistoricalLinkedHashMap<K,V> extends AbstractHistoricalMap<K,V,LinkedHashMap<K,V>>
LinkedHashMap-valued historical state. The current linked hash map is always maintained, and past states of the linked hash
map are obtained by applying the events between now and the requested time in reverse.
The set views returned by this class are unmodifiable.
The set views returned by this class are unmodifiable.
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 3 feb. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opentrafficsim.core.perception.collections.AbstractHistoricalMap
AbstractHistoricalMap.EventMap<K,V,M extends Map<K,V>>Nested classes/interfaces inherited from class org.opentrafficsim.core.perception.AbstractHistorical
AbstractHistorical.EventValue<T> -
Constructor Summary
Constructors Constructor Description HistoricalLinkedHashMap(HistoryManager historyManager)Constructor.HistoricalLinkedHashMap(HistoryManager historyManager, Map<? extends K,? extends V> m)Constructor. -
Method Summary
Methods inherited from class org.opentrafficsim.core.perception.collections.AbstractHistoricalMap
clear, containsKey, containsValue, entrySet, fill, fill, get, getMap, isEmpty, keySet, put, putAll, remove, size, valuesMethods inherited from class org.opentrafficsim.core.perception.AbstractHistorical
addEvent, cleanUpHistory, getEvent, getEvents, getLastEvent, isLastState, now, removeEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.core.perception.collections.HistoricalMap
replaceAllMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace
-
Constructor Details
-
HistoricalLinkedHashMap
Constructor.- Parameters:
historyManager- HistoryManager; history manager
-
HistoricalLinkedHashMap
Constructor.- Parameters:
historyManager- HistoryManager; history managerm- Map<? extends K, ? extends V>; initial map
-
-
Method Details