[concurrency-interest] More on: AtomicInteger and AtomicLong should implement Numbe

Gregg Wonderly gregg.wonderly@pobox.com
Sat, 10 Jan 2004 09:57:46 -0600


Doug Lea wrote:
> While I'm at it: Could someone who favors subclassing Number try
> writing sample AtomicInteger/AtomicLong javadoc that would deconfuse
> those new users who are NOT expecting it.  And keep it really short
> and obvious so people might actually notice it?

In an attempt to cover all the issues summarily I would write something 
like:

Concerning Number subclassing: This class subclasses Number to provide 
the convenience of those methods for access to the value within.  This 
class is mutable, unlike the native Java type Number implementations. 
Instances of this class are therefore not intended to be casually passed 
around into contexts where the mutability might be unexpected.

Gregg