Class TimeOfUsePrices


  • public class TimeOfUsePrices
    extends java.lang.Object
    Holds time of use prices for 24 h and the time when it is retrieved; // prices are one value per 15 minutes; 96 values in total.

    Values have unit EUR/MWh.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NUMBER_OF_VALUES  
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeOfUsePrices​(java.time.ZonedDateTime updateTime, java.lang.Float... values)
      Constructs a TimeOfUsePrices.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static TimeOfUsePrices empty​(java.time.ZonedDateTime updateTime)
      Factory method for an 'empty' TimeOfUsePrices object, i.e.
      java.time.ZonedDateTime getUpdateTime()
      Gets the time of the last update of prices.
      java.lang.Float[] getValues()
      Gives electricity prices for the next 24 h; one value per 15 minutes; 96 values in total.
      boolean isEmpty()
      Is this TimeOfUsePrices empty, i.e.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TimeOfUsePrices

        public TimeOfUsePrices​(java.time.ZonedDateTime updateTime,
                               java.lang.Float... values)
        Constructs a TimeOfUsePrices.
        Parameters:
        updateTime - Retrieved time of the prices.
        values - the 96 quarterly price values[24 hours].
    • Method Detail

      • empty

        public static TimeOfUsePrices empty​(java.time.ZonedDateTime updateTime)
        Factory method for an 'empty' TimeOfUsePrices object, i.e. all values are 'null'.
        Parameters:
        updateTime - the update time as ZonedDateTime
        Returns:
        an 'empty' TimeOfUsePrices object
      • getValues

        public java.lang.Float[] getValues()
        Gives electricity prices for the next 24 h; one value per 15 minutes; 96 values in total.

        E.g. if called at 10:05, the first value stands for 10:00 to 10:15; second value for 10:15 to 10:30.

        Returns:
        the prices
      • getUpdateTime

        public java.time.ZonedDateTime getUpdateTime()
        Gets the time of the last update of prices.
        Returns:
        the time
      • isEmpty

        public boolean isEmpty()
        Is this TimeOfUsePrices empty, i.e. every value is 'null'?.
        Returns:
        true if all values are null; false otherwise