Is there a general equivalent to the ArrayIterator from the Apache Commons collections?

ArrayIteratorconvenient (although I do not need functionality reset), but, like the rest of the Commons collection of material, it does not use generics. I checked Google Collections , but I did not see a close equivalent. Did I miss this? Is there another library with the same reputation and quality as the first two that provide such a thing? Thank.

+5
source share
1 answer

Arrays.asList(array).iterator()

Arrays.asList(array).subList(start, end).iterator()

These method calls are cheap - in fact, they do not copy any data. The class Arraysis in java.util, of course.

+15

All Articles