Class HistoricalValue<T>

    • Constructor Detail

      • HistoricalValue

        public HistoricalValue​(HistoryManager historyManager)
        Constructor.
        Parameters:
        historyManager - HistoryManager; history manager
      • HistoricalValue

        public HistoricalValue​(HistoryManager historyManager,
                               T initialValue)
        Construct a new HistoricalValue.
        Parameters:
        historyManager - HistoryManager; history manager
        initialValue - T; initial value
    • Method Detail

      • set

        public final void set​(T value)
        Set value at the current simulation time. If a value is already stored for this time, it is replaced.
        Specified by:
        set in interface Historical<T>
        Parameters:
        value - T; value
      • get

        public final T get()
        Get value at current simulation time. TODO specify what happens when no value was set for the current simulation time
        Specified by:
        get in interface Historical<T>
        Returns:
        T; value at current simulation time
      • get

        public final T get​(Time time)
        Get value at a specific time. TODO specify what happens when no value has ever been set, or the value for the specified time can not be determined.
        Specified by:
        get in interface Historical<T>
        Parameters:
        time - Time; time to get the value
        Returns:
        T; value at current time