> 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.

Rich



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to