Class SensorTimeSeries


  • public class SensorTimeSeries
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(int timestep, double value)
      Adds a timestep-value pair to the this time series.
      boolean equals​(java.lang.Object obj)  
      int getLength()  
      java.lang.Double getValueOrNull​(int timestep)
      Returns the value of the given timestep if one exists, null otherwise.
      SensorTimeSeries getWindowedTimeSeries​(int fromTimestep, int toTimestep)
      Returns a part of this time series starting at the given fromTimestep and ending at the given toTimestep excluding.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SensorTimeSeries

        public SensorTimeSeries()
    • Method Detail

      • addValue

        public void addValue​(int timestep,
                             double value)
        Adds a timestep-value pair to the this time series. It is assumed that the given timestep is larger than any other before, so that at the end it holds: t_i < t_j for i < j.
        Parameters:
        timestep - The timestep for which a value will be added
        value - The value of the timestep
      • getValueOrNull

        public java.lang.Double getValueOrNull​(int timestep)
        Returns the value of the given timestep if one exists, null otherwise.
        Parameters:
        timestep - The timestep to get the value for
        Returns:
        The value of the given timestep if one exists, otherwise null.
      • getWindowedTimeSeries

        public SensorTimeSeries getWindowedTimeSeries​(int fromTimestep,
                                                      int toTimestep)
        Returns a part of this time series starting at the given fromTimestep and ending at the given toTimestep excluding.
        Parameters:
        fromTimestep - The starting point of the window
        toTimestep - The ending point of the window (exclusive)
        Returns:
        A window of this SensorTimeSeries
      • getLength

        public int getLength()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object