[concurrency-interest] Re: AtomicInteger and AtomicLong should implement Number

Larry Riedel larryr@saturn.sdsu.edu
5 Jan 2004 06:07:23 -0000

> > I can imagine someone seeing "AtomicInteger" and "AtomicLong" and
> > expecting/inferring they are a kind of Integer and Long, respectively.
> I agree that seeing the name alone might lead to that inference -
> though it would seem more likely to lead to the inference that AtomicX
> is a subtype of class X.

I would call a subtype of class X, "a kind of X", and I think it
would be correct to say an instance of that subtype "is" an X, in
the "Liskov Substitution Principle" sense.

> I would hope that reading the class docs will quickly dispel any
> confusion without the need to rename these classes at this stage.

I very much hope that reading the class docs will dispel any
confusion regardless of how obtusely the class is named, and
because of my unbridled optimism about "generics" in Java, I
think it does not matter what these particular names are. :)