javamoney
  1. javamoney
  2. JAVAMONEY-25

Multi MonetaryAmount and CurrencyUnit Values

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Impl: RI
    • Labels:
      None

      Description

      Define a compound multi-valued monetary amount that consists of several amounts:

      • of the same currency, but with different semantics, e.g. for use cases in insurance calculations
      • of different currencies, e.g. for easily switching between currencies supported in web shop
      • 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{{MonetaryAmount}} instances:
        • Map<String,MonetaryAmount> getAll()
        • Enumeration<String> getKeys();
        • MonetaryAmount getMonetaryAmount(String key)
        • boolean isMonetaryAmountDefined(String key)
      • It allows access to all different currencies contained:
        • Enumeration<CurrencyUnit> getContainedCurrencies()
      • it provides a CompoundMonetaryAmountFactory for creating compound values.
      • Since a compound amount is defined to be immutable, it can only be extended/adapted as follows:
        • CompoundMonetaryAmount add(String key, MonetaryAmount amount);
        • CompoundMonetaryAmount remove(String... key);
        • CompoundMonetaryAmountBuilder toBuilder() // and using the builder to create a new instance

        Activity

        atsticks created issue -
        atsticks made changes -
        Field Original Value New Value
        Description Define a compound multi-valued monetary amount that consists of several amounts:
        * of the same currency, but with different semantics, e.g. for use cases in insurance calculations
        * of different currencies, e.g. for easily switching between currencies supported in web shop
        * 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{{MonetaryAmount}} instances:
        ** {{Map<String,MonetaryAmount> getAll()}}
        ** {{Enumeration<String> getKeys();}}
        ** {{MonetaryAmount getAmount(String key)}}
        ** {{boolean isAmountDefined(String key)}}
        * It allows access to all different currencies contained:
        ** {{Enumeration<CurrencyUnit> getContainedCurrencies()}}
        * it provides a {{CompoundAmountFactory}} for creating compound values.
        * Since a compound amount is defined to be immutable, it can only be extended/adapted as follows:
        ** {{CompoundMonetaryAmount add(String key, MonetaryAmount amount);}}
        ** {{CompoundMonetaryAmount remove(String... key);}}

        Define a compound multi-valued monetary amount that consists of several amounts:
        * of the same currency, but with different semantics, e.g. for use cases in insurance calculations
        * of different currencies, e.g. for easily switching between currencies supported in web shop
        * 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{{MonetaryAmount}} instances:
        ** {{Map<String,MonetaryAmount> getAll()}}
        ** {{Enumeration<String> getKeys();}}
        ** {{MonetaryAmount getMonetaryAmount(String key)}}
        ** {{boolean isMonetaryAmountDefined(String key)}}
        * It allows access to all different currencies contained:
        ** {{Enumeration<CurrencyUnit> getContainedCurrencies()}}
        * it provides a {{CompoundMonetaryAmountFactory}} for creating compound values.
        * Since a compound amount is defined to be immutable, it can only be extended/adapted as follows:
        ** {{CompoundMonetaryAmount add(String key, MonetaryAmount amount);}}
        ** {{CompoundMonetaryAmount remove(String... key);}}
        ** {{CompoundMonetaryAmountBuilder toBuilder()}} // and using the builder to create a new instance
        keilw made changes -
        Component/s Spec: extensions [ 14823 ]
        Component/s Spec: core [ 14820 ]
        atsticks made changes -
        Comment [ kjh ]
        atsticks made changes -
        Summary Multi Currency Monetary Value Multi MonetaryAmount Value
        atsticks made changes -
        Summary Multi MonetaryAmount Value Multi MonetaryAmount and CurrencyUnit Values
        atsticks made changes -
        Fix Version/s 1.0-b01 [ 16318 ]
        atsticks made changes -
        Component/s Spec: Specification [ 14828 ]
        atsticks made changes -
        Fix Version/s 0.3 [ 16322 ]
        Fix Version/s 1.0-b01 [ 16318 ]
        keilw made changes -
        Fix Version/s 0.5 [ 16430 ]
        Fix Version/s 0.3 [ 16322 ]
        Priority Major [ 3 ] Minor [ 4 ]
        atsticks made changes -
        Fix Version/s 0.5 [ 16430 ]
        Component/s Impl: Java Money Extras [ 15070 ]
        Component/s API: Provided Extensions [ 14823 ]
        keilw made changes -
        Component/s Impl: RI [ 14824 ]
        Component/s Impl: Java Money Extras [ 15070 ]
        keilw made changes -
        Fix Version/s 0.9 [ 16866 ]
        atsticks made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 0.9 [ 16866 ]
        Resolution Won't Fix [ 2 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: