-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could we merge some or all of ComparableQuantity into Quantity? #96
Comments
The issue in the sort is what happens when we have different unit types in the list? IMHO: that should be outside of the API |
Hard to say, the list could still be strongly typed with |
If you create our list yes, however, java is Type Erasure. So we don't have any control about that. |
Of course even JavaMoney has a hard time to compare multiple amounts in a list, if the |
In the Hangout we found too little synergies or strong arguments for API inclusion, therefore leaving the interface in the RI for now. |
Unlike key elements of JSR 354 (
CurrencyUnit
orMonetaryAmount
)Quantity
(as well asUnit
) neither applyComparable
nor other interfaces likeSerializable
.On an implementation level ComparableQuantity was introduced for that reason. While
Serializable
is questionable outside the implementation (also see #43 or how JSR 354 keeps it in the RI)Comparable
and maybe at least some methods inComparableQuantity
could be beneficial toQuantity
.The text was updated successfully, but these errors were encountered: