ArrayIterator is handy (although I don’t need the reset functionality), but like the rest of the Commons Collections stuff, it doesn’t use generics. I checked Google Collections, but I didn’t see a close equivalent. Did I miss it? Is there another library of similar reputation and quality as the first two that provides such a thing? Thanks.
ArrayIterator is handy (although I don’t need the reset functionality), but like the rest
Share
Arrays.asList(array).iterator()Arrays.asList(array).subList(start, end).iterator()These method calls are cheap — they don’t actually copy any data. The
Arraysclass is injava.util, of course.