Class SimpleTariff

java.lang.Object
net.solarnetwork.domain.tariff.SimpleTariff
All Implemented Interfaces:
Tariff

public class SimpleTariff extends Object implements Tariff
Simple implementation of Tariff.
Since:
1.71
Version:
1.0
Author:
matt
  • Constructor Details

    • SimpleTariff

      public SimpleTariff(Map<String,Tariff.Rate> rates)
      Constructor.
      Parameters:
      rates - the rate mapping of rate IDs to associated rates
    • SimpleTariff

      public SimpleTariff(Iterable<Tariff.Rate> rates)
      Constructor.

      This will create a map from the given rates, using the rate IDs as the map keys.

      Parameters:
      rates - the rate collection
  • 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