ConForM.CoopnTools.CoKer.CoopnSem
Class CoopnSemIterator

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnSem.CoopnSemIterator
All Implemented Interfaces:
java.util.Iterator
Direct Known Subclasses:
CoopnSubstitutionIterator, StateIterator, StepIterator

public abstract class CoopnSemIterator
extends java.lang.Object
implements java.util.Iterator

Generic CoopnSem iterator. Iterator returned by a CoopnSem object (called the associated CoopnSem object) according to a request.

See Also:
CoopnSem

Field Summary
protected  LogicEngine associatedEngine
           
protected  CoopnSem associatedSem
           
protected  int bound
           
protected  AnonymousNameBridge bridge
           
protected  CoopnEnv env
           
protected  int mode
           
protected  java.util.Map shortenedVars
           
protected  boolean shortForm
           
protected  ConForM.CoopnTools.CoKer.CoopnSem.Coopn2Logic.Coopn2Logic translator
           
 
Method Summary
protected  CoopnSubstitution buildSigma(LogicUnification u)
           
 boolean hasNext()
          Implementation of the methods hasNext() of Iterator.
protected abstract  boolean internalHasNext()
           
protected abstract  java.lang.Object internalNext()
           
protected abstract  void internalStart()
           
protected abstract  void internalTerminate()
           
 java.lang.Object next()
          Implementation of the methods next() of Iterator.
 void remove()
          Implementation of the methods remove() of Iterator.
 void start()
          Start the use of this iterator, iff it is not already started.
 void terminate()
          Terminates the use of the iterator, iff it is started and not terminated yet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

associatedSem

protected CoopnSem associatedSem

associatedEngine

protected LogicEngine associatedEngine

translator

protected ConForM.CoopnTools.CoKer.CoopnSem.Coopn2Logic.Coopn2Logic translator

shortForm

protected boolean shortForm

mode

protected int mode

bound

protected int bound

env

protected CoopnEnv env

bridge

protected AnonymousNameBridge bridge

shortenedVars

protected java.util.Map shortenedVars
Method Detail

internalHasNext

protected abstract boolean internalHasNext()
                                    throws java.lang.UnsupportedOperationException

internalNext

protected abstract java.lang.Object internalNext()
                                          throws java.lang.UnsupportedOperationException,
                                                 java.util.NoSuchElementException

internalStart

protected abstract void internalStart()

internalTerminate

protected abstract void internalTerminate()

hasNext

public final boolean hasNext()
                      throws java.lang.UnsupportedOperationException
Implementation of the methods hasNext() of Iterator.
Specified by:
hasNext in interface java.util.Iterator
Returns:
true iff the iterator has a next element.
Throws:
java.lang.UnsupportedOperationException - This iterator is invalidated, because the associated CoopnSem object has handled another request.

next

public final java.lang.Object next()
                            throws java.lang.UnsupportedOperationException,
                                   java.util.NoSuchElementException
Implementation of the methods next() of Iterator.
Specified by:
next in interface java.util.Iterator
Returns:
the next object in the iteration, if it exists. This object is guaranteed to be of the correct type according to the original request (see CoopnSem).
Throws:
java.lang.UnsupportedOperationException - This iterator is invalidated, because the associated CoopnSem object has handled another request.
java.util.NoSuchElementException - There is no next element.
See Also:
CoopnSem

remove

public final void remove()
                  throws java.lang.UnsupportedOperationException,
                         java.lang.IllegalStateException
Implementation of the methods remove() of Iterator. Always throws an UnsupportedOperationException, as remove on CoopnSemIterators is not supported.
Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - Operation not supported. Always thrown.
java.lang.IllegalStateException - Never thrown.

start

public void start()
Start the use of this iterator, iff it is not already started.

terminate

public void terminate()
Terminates the use of the iterator, iff it is started and not terminated yet.

buildSigma

protected CoopnSubstitution buildSigma(LogicUnification u)