Skip to main content

A Money class

2 replies [Last post]
teknokrat
Offline
Joined: 2004-06-08

Add a Money class to java.util that would encapsulate a currency and its value. Add the ability to also add a CurrencyConversionServiceProvider. This would greatly aid those of us that work with international currencies. As a standar part of the jdk it would put a stop to some of the (very) badly designed money implemations around ( or worse - people using floats/doubles for financial calculations ).

It would also help if the basic arithmetical operators for the class were overloaded. Writing long financial equations with BigDecimal is very unpleasant.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
yishai
Offline
Joined: 2003-11-16

I would like to see this taken further. A primative which is suitable for currency calculations. It continues to amaze me how many projects actually do finantial work in Java considering financial calculations are essentially not supported by the language. I have to think that there are projects which chose something else for their finantial application specifically because of this issue.

zander
Offline
Joined: 2003-06-13