Class SimpleTemporalTariff

java.lang.Object
net.solarnetwork.domain.tariff.SimpleTemporalTariff
All Implemented Interfaces:
Tariff, TemporalTariff

public class SimpleTemporalTariff extends Object implements TemporalTariff
A simple implementation of TemporalTariff that delegates to another Tariff.
Since:
1.71
Version:
1.0
Author:
matt
  • Constructor Details

    • SimpleTemporalTariff

      public SimpleTemporalTariff(LocalDateTime dateTime, Tariff delegate)
      Constructor.
      Parameters:
      dateTime - a date time
      delegate - the tariff
  • Method Details

    • getRates

      public Map<String,Tariff.Rate> getRates()
      Description copied from interface: Tariff
      Get the rates that apply with this tariff.
      Specified by:
      getRates in interface Tariff
      Returns:
      the rates, as a mapping of rate IDs to associated rates, never null
    • getDate

      public LocalDate getDate()
      Description copied from interface: TemporalTariff
      Get a date associated with this tariff.
      Specified by:
      getDate in interface TemporalTariff
      Returns:
      the date, or null
    • getTime

      public LocalTime getTime()
      Description copied from interface: TemporalTariff
      Get a time associated with this tariff.
      Specified by:
      getTime in interface TemporalTariff
      Returns:
      the time, or null