Patch used to extend array iterators in general, thanks. Take a look - we
now have:
ArrayIterator
ArrayListIterator
ObjectArrayIterator
ObjectArrayListIterator
The first two support primitives, but with a performance penalty. The latter
two don't, so run faster. Comments welcome.
Stephen
-
Hi Stephen, Rich,
> Would it be possible for you to refactor to remove
> UnmodifiableArrayListIterator? Thanks ;-)
No prob. Please find attached updated patches & files as per your
suggestion. The comments for each file are as per the previous message
except:
- ArrayIterator.patch : changes as b
> from:Rich Dougherty <[EMAIL PROTECTED]>
> I have seen this sort of thing done before. For example, in the JODA Time
> library, ReadableWritableInstant (mutable) extends ReadableInstant
> (immutable). :-)
Actually, the ReadableInstant interface is named and defined to allow a field to be
re
> 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 w
The attached zip includes the following new classes:
- UnmodifiableArrayListIterator: provides a ListIterator impl over an
array. Does not support ListIterator#set, #add, or #remove. Extends
ArrayIterator (which does not support #add or #remove either).
- ArrayListIterator.java : Extends Unmodi
The attached zip includes the following new classes:
- UnmodifiableArrayListIterator: provides a ListIterator impl over an
array. Does not support ListIterator#set, #add, or #remove. Extends
ArrayIterator (which does not support #add or #remove either).
- ArrayListIterator.java : Extends Unmodif