Class AbstractHistoricalMap.EventMap<K,​V,​M extends java.util.Map<K,​V>>

  • Type Parameters:
    K - key type
    V - value type
    M - map type
    Enclosing class:
    AbstractHistoricalMap<K,​V,​M extends java.util.Map<K,​V>>

    public static class AbstractHistoricalMap.EventMap<K,​V,​M extends java.util.Map<K,​V>>
    extends AbstractHistorical.EventValue<K>
    Abstract super class for events that add or remove a value from the map.

    Copyright (c) 2013-2020 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 1 jan. 2018
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Summary

      Constructors 
      Constructor Description
      EventMap​(double time, K key, boolean contained, V previousValue)
      Constructor.
    • Constructor Detail

      • EventMap

        public EventMap​(double time,
                        K key,
                        boolean contained,
                        V previousValue)
        Constructor.
        Parameters:
        time - double; time of event
        key - K; key of event
        contained - boolean; whether the map contained the key prior to the event
        previousValue - V; previous value in the map
    • Method Detail

      • restore

        public void restore​(M map)
        Restores the map to the state of before the event.
        Parameters:
        map - M; map to restore