Skip to main content

[JSR-currency] Re: Important use case regarding rounding

  • From: Sascha Freitag <dunschtig@...>
  • To: jcurrency_mail@...
  • Subject: [JSR-currency] Re: Important use case regarding rounding
  • Date: Thu, 03 Jan 2013 23:16:19 +0100

Hi Anatole/all,

as also written in another mail, I think we should keep the Amount interface focused (or how we call it at the end, Amount is kind of too broad/common term in my view). So we should only place the basic functionalty on this interface.

But I agree to take the current version as the next step forward.

Regards Sascha

On 02.01.2013 06:55, Anatole Tresch wrote:
If its only one method, or some more we could add them to the Amount interface. On the other side, we could also provide some method on a separate financial mathematics interface, e.g. MathFinance, where we could also provide further logic. Though from the JSR's objective, as far as I have understood, more complex stuff such as NPV calculations, interest calculation and timelines were not in scope.
So, summarizing: other suggestions are welcome!


2013/1/1 Victor Grazi <vgrazi@...>
Anatole - Where are you seeing that method?


On Tue, Jan 1, 2013 at 5:34 PM, Anatole Tresch <atsticks@...> wrote:
Also the method

divideEvenlyIntoParts

seems to target the same use case that Victor has described...




2013/1/1 Werner Keil <werner.keil@...>
Anatole/all,

Please check out this guy's implementation on GitHub:

It is a simple Money class though it seems it contained Hibernate support earlier (which in other form e.g. JPA we may add for EE 8

As a matter of fact, the author is Danish, so I'll try to get in touch with him and see, if he'd like to contribute or at least follow the JSR.

Regards,
Werner


On Tue, Jan 1, 2013 at 9:30 PM, Anatole Tresch <atsticks@...> wrote:



2013/1/1 Werner Keil <werner.keil@...>
Btw, ICU4J has a money equivalent named CurrencyAmount
Although ICU may take a long time till it would consider using something like this JSR internally, allowing other APIs and frameworks like ICU4J to use the JSR is a compelling argument for leaving it as an interface.
Implementations, including RI classes (whether we call  it CurrencyAmount or something different let's see, the current class proposed is simply named Money, intended for java.util or a similar place in Java SE and/or ME/CLDC) could inherit from Number if required, but maybe we should leave that out of the core Spec.
 
Yes, I totally agree, leave it an interface. I just wanted to have a short discussion on that topic, ;-). For me the advantages of modelling it as an interface clearly have greater benefits than relating it with SE Number types on spec level. So, go for it!
 
--
Anatole Tresch
Java Lead Engineer, JSR Spec Lead
Gärnischweg 10
CH - 8620 Wetzikon

Switzerland, Europe Zurich, GMT+1
Twitter:  @atsticks




--
Anatole Tresch
Java Lead Engineer, JSR Spec Lead
Gärnischweg 10
CH - 8620 Wetzikon

Switzerland, Europe Zurich, GMT+1
Twitter:  @atsticks




--
Anatole Tresch
Java Lead Engineer, JSR Spec Lead
Gärnischweg 10
CH - 8620 Wetzikon

Switzerland, Europe Zurich, GMT+1
Twitter:  @atsticks
Google: atsticks
Phone   +41-44 334 40 87
Mobile  +41-76 344 62 79


-- 

Sascha Freitag v/o Dunschtig


[JSR-currency] Re: Important use case regarding rounding

(continued)

[JSR-currency] Re: Important use case regarding rounding

KFSC 52 01/07/2013

[JSR-currency] Re: Important use case regarding rounding

KFSC 52 01/07/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Anatole Tresch 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Anatole Tresch 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Victor Grazi 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Anatole Tresch 01/02/2013

[JSR-currency] Re: Important use case regarding rounding

Anatole Tresch 01/02/2013

[JSR-currency] Re: Important use case regarding rounding

Sascha Freitag 01/03/2013

[JSR-currency] Re: Important use case regarding rounding

KFSC 52 01/07/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/07/2013

[JSR-currency] Re: Important use case regarding rounding

Sascha Freitag 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/01/2013

[JSR-currency] Re: Important use case regarding rounding

Sascha Freitag 01/03/2013

[JSR-currency] Re: Important use case regarding rounding

Ben Evans 01/03/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/03/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/03/2013

[JSR-currency] Re: Important use case regarding rounding

Ben Evans 01/04/2013

[JSR-currency] Re: Important use case regarding rounding

Werner Keil 01/04/2013
 
 
Close
loading
Please Confirm
Close