Class TimeSeries<E extends TimeSeriesEntry<V>,V extends Value>

java.lang.Object
edu.ie3.datamodel.models.UniqueEntity
edu.ie3.datamodel.models.timeseries.TimeSeries<E,V>
Type Parameters:
E - Type of the entries, the time series is foreseen to contain
V - Type of the values, the entries will have
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IndividualTimeSeries, RepetitiveTimeSeries

public abstract class TimeSeries<E extends TimeSeriesEntry<V>,V extends Value> extends UniqueEntity
Describes a Series of values
See Also:
  • Constructor Details

    • TimeSeries

      protected TimeSeries(Set<E> entries)
    • TimeSeries

      protected TimeSeries(UUID uuid, Set<E> entries)
  • Method Details

    • getTimeBasedValue

      public Optional<TimeBasedValue<V>> getTimeBasedValue(ZonedDateTime time)
      Get the time based value for the queried time
      Parameters:
      time - Reference in time
      Returns:
      the value at the given time step as a TimeBasedValue
    • getValue

      public abstract Optional<V> getValue(ZonedDateTime time)
      If you prefer to keep the time with the value, please use getTimeBasedValue(java.time.ZonedDateTime) instead
      Parameters:
      time - Queried time
      Returns:
      An option on the raw value at the given time step
    • getPreviousDateTime

      protected abstract Optional<ZonedDateTime> getPreviousDateTime(ZonedDateTime time)
      Get the next earlier known time instant
      Parameters:
      time - Reference in time
      Returns:
      The next earlier known time instant
    • getNextDateTime

      protected abstract Optional<ZonedDateTime> getNextDateTime(ZonedDateTime time)
      Get the next later known time instant
      Parameters:
      time - Reference in time
      Returns:
      The next later known time instant
    • getPreviousTimeBasedValue

      public Optional<TimeBasedValue<V>> getPreviousTimeBasedValue(ZonedDateTime time)
      Get the most recent available value before or at the given time step as a TimeBasedValue
      Parameters:
      time - Reference in time
      Returns:
      the most recent available value before or at the given time step as a TimeBasedValue
    • getNextTimeBasedValue

      public Optional<TimeBasedValue<V>> getNextTimeBasedValue(ZonedDateTime time)
      Get the next available value after or at the given time step as a TimeBasedValue
      Parameters:
      time - Reference in time
      Returns:
      the next available value after or at the given time step as a TimeBasedValue
    • getEntries

      public Set<E> getEntries()
      Returns all unique entries
      Returns:
      all unique entries
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class UniqueEntity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class UniqueEntity
    • toString

      public String toString()
      Overrides:
      toString in class UniqueEntity