org.jutil.java.collections
Class Singleton.SingletonIterator

java.lang.Object
  |
  +--org.jutil.java.collections.Singleton.SingletonIterator
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
Singleton

public class Singleton.SingletonIterator
extends java.lang.Object
implements java.util.Iterator


Constructor Summary
Singleton.SingletonIterator()
           
 
Method Summary
 boolean hasNext()
          also public behavior

post \result == onlyElementNotReturnedYet;
See superclass
 java.lang.Object next()
          also public behavior

post \result == getOnlyElement();
post onlyElementNotReturnedYet == false;
exception NoSuchElementException (\old(! onlyElementNotReturnedYet));
See superclass
 void remove()
          also public behavior

post false;
exception UnsupportedOperationException true;
See superclass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Singleton.SingletonIterator

public Singleton.SingletonIterator()
Method Detail

hasNext

public boolean hasNext()
also public behavior

post \result == onlyElementNotReturnedYet;
See superclass
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
also public behavior

post \result == getOnlyElement();
post onlyElementNotReturnedYet == false;
exception NoSuchElementException (\old(! onlyElementNotReturnedYet));
See superclass
Specified by:
next in interface java.util.Iterator

remove

public void remove()
            throws java.lang.UnsupportedOperationException
also public behavior

post false;
exception UnsupportedOperationException true;
See superclass
Specified by:
remove in interface java.util.Iterator