ch.javasoft.util.intcoll
Class AbstractIntIterator
java.lang.Object
ch.javasoft.util.intcoll.AbstractIntIterator
- All Implemented Interfaces:
- IntIterator, Iterator<Integer>
- Direct Known Subclasses:
- AbstractIntListIterator
public abstract class AbstractIntIterator
- extends Object
- implements IntIterator
The AbstractIntIterator is an abstract default pre-implementation
for those methods which are typically common for an IntIterator.
More precisely, the method remove() throws an exception and
next() is implemented by calling IntIterator.nextInt(),
which is to be implemented by subclasses, as well as
Iterator.hasNext().
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractIntIterator
public AbstractIntIterator()
next
public Integer next()
- Calls
IntIterator.nextInt() and returns an Integer object
- Specified by:
next in interface Iterator<Integer>
remove
public void remove()
- Always throws an
UnsupportedOperationException
- Specified by:
remove in interface Iterator<Integer>