ch.javasoft.util.intcoll
Class AbstractIntIterator

java.lang.Object
  extended by 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().


Field Summary
 
Fields inherited from interface ch.javasoft.util.intcoll.IntIterator
EMPTY
 
Constructor Summary
AbstractIntIterator()
           
 
Method Summary
 Integer next()
          Calls IntIterator.nextInt() and returns an Integer object
 void remove()
          Always throws an UnsupportedOperationException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.javasoft.util.intcoll.IntIterator
nextInt
 
Methods inherited from interface java.util.Iterator
hasNext
 

Constructor Detail

AbstractIntIterator

public AbstractIntIterator()
Method Detail

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>