Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8
    • Component/s: API
    • Labels:
      None

      Description

      Define a compound multi-valued exchange rate that consists of several exchange rates:

      • of the same provider, but with different target currencies
      • of different providers, but with the same target currency
      • a mix of the above.

      A compound value has the following properties:

      • it is immutable.
      • it does not offer arithemtics
      • it provides access to all its containing{{ExchangeRate}} instances:
        • Map<String,ExchangeRate> getAll()
        • Enumeration<String> getKeys();
        • ExchangeRategetExchangeRate(String key)
        • boolean isExchangeRateDefined(String key)
      • It allows access to all different rates contained:
        • Enumeration<ExchangeRate> getContainedExchangeRates()
      • it provides a CompoundExchangeRateFactory for creating compound values.
      • Since a compound amount is defined to be immutable, it can only be extended/adapted as follows:
        • CompoundExchangeRate add(String key, ExchangeRate amount);
        • CompoundExchangeRate remove(String... key);
        • CompuntExchangeRateBuilder toBuilder() // and using the builder to create a new instance

        Activity

        Hide
        chrispheby added a comment -

        I guess this would be part of an extension module.

        Show
        chrispheby added a comment - I guess this would be part of an extension module.
        Hide
        atsticks added a comment -

        Basically they are currently here, because I was thinking about using them in some API/SPI here for multi provider access of exchange rates (until now I did not have the time, to dive deeper on this topic). If finally (since it shows not to be useful, I am not able to make a useful proposal or whatever) they are not used by this module, of course, I totally agree, to move them to the extensions part. So just be a bit patient

        Show
        atsticks added a comment - Basically they are currently here, because I was thinking about using them in some API/SPI here for multi provider access of exchange rates (until now I did not have the time, to dive deeper on this topic). If finally (since it shows not to be useful, I am not able to make a useful proposal or whatever) they are not used by this module, of course, I totally agree, to move them to the extensions part. So just be a bit patient

          People

          • Assignee:
            atsticks
            Reporter:
            atsticks
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: