[ 
https://issues.apache.org/jira/browse/LANG-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18000672#comment-18000672
 ] 

Gary D. Gregory commented on LANG-706:
--------------------------------------

I'm not sure [Lang] is the right place for math operations on these simple 
types. Commons has a [Math] component.

Note that all of these classes precede the introduction of the 
{{java.util.concurrent.atomic}} package and classes like {{{}AtomicInteger{}}}.

You'll notice that {{AtomicInteger}} and friends do NOT implement a shared 
interface for math operations.

> Create a MutableNumber interface with methods common to all the mutable 
> numbers
> -------------------------------------------------------------------------------
>
>                 Key: LANG-706
>                 URL: https://issues.apache.org/jira/browse/LANG-706
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.mutable.*
>            Reporter: Juan Carlos Estibariz
>            Priority: Minor
>             Fix For: Patch Needed
>
>
> With this interface it would be possible to perform generic operations on 
> mutable numbers without worrying about the specific type, e.g.
> {code}
> // these two could be created in a different methods
> MutableNumber m = new MutableDouble();
> Number n = ...;
> // this would do the right thing
> m.add(n);
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to