There have been a few threads about mutable numbers and I'll try to summarize the ideas.

1) What package/project should these classes go in?

My initial thought was lang.math, but if we create MutableByte, MutableString, or others non-numeric types, this isn't a good fit. lang.mutable may be a better fit.

2) What type of naming scheme should we use?

MutableInteger vs. MInteger vs. IntegerHolder vs. ?

3) Comparision between my (matth) initial implementation vs. Geronimos

I can't find the Mutable classes in Geronimo anymore. Perhaps they were removed?

One of the primary differences I noted was that the Geromino classes contained additional methods such add add(int), subtract(int), and things like that. I find this similar to Henri's suggestion that MutableString contain StringUtils-like methods (split(), capitalize(), etc).

Another difference was the existence of a Mutable interface I (hen) think.

4) List of classes to have mutable versions of

We would need Int, Boolean and Float as well IMHO. Otherwise the get() becomes a typecast pain.

MutableNumbers (last edited 2009-09-20 23:48:42 by localhost)