commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Dougherty" <>
Subject Re: [collections] [patch] changes for ArrayListIterator was: Re: [collections] private member access in o.a.c.collections.iterators
Date Tue, 10 Dec 2002 19:22:13 GMT
> Also, I am very uncomfortable with ArrayListIterator being a subclass of
> UnmodifiableArrayListIterator. There is no 'is a' relationship here, and
> worse, if I declared a method to take in an
> UnmodifiableArrayListIterator it would accept a modifiable one which
> would probably not be what I want.

I have seen this sort of thing done before. For example, in the JODA Time
library, ReadableWritableInstant (mutable) extends ReadableInstant
(immutable). :-)

However, I agree with you in this case. Using the word "unmodifiable"
implies that subclasses will be immutable, whereas "readable" only
suggests that subclasses will be able to read its value.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message