All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gw.util.money.CurrencyExchange.gs Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
package gw.util.money
uses java.net.URL
uses gw.util.science.Time
uses gw.util.science.UnitConstants

/**
 * Override and access the currency rate service via the ExchangeRatesService property
 */
class CurrencyExchange {
  static final var INSTANCE: CurrencyExchange = new CurrencyExchange()
  
  static function instance() : CurrencyExchange {
    return INSTANCE  
  }
  
  var _exchangeRatesService: IExchangeRatesService
  
  private construct() {
  }
  
  property get ExchangeRatesService() : IExchangeRatesService {
    _exchangeRatesService = _exchangeRatesService?:new DefaultExchangeRatesService()
    return _exchangeRatesService
  }
  property set ExchangeRatesService( service: IExchangeRatesService ) {
    _exchangeRatesService = service  
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy