ai.krr.propositions
Class Interpretation.InterpretationIterator

java.lang.Object
  extended by ai.krr.propositions.Interpretation.InterpretationIterator
All Implemented Interfaces:
java.util.Iterator<Interpretation>
Enclosing class:
Interpretation

public static class Interpretation.InterpretationIterator
extends java.lang.Object
implements java.util.Iterator<Interpretation>


Constructor Summary
Interpretation.InterpretationIterator(java.util.Set<NamedSymbol> sys)
           This constructor creates and initializes a new Iterator that can be used to enumerate all possible Interpretations for a given Set of NamedSymbols.
 
Method Summary
 boolean hasNext()
           This function tests whether there are more, different Interpretations to be enumerated.
 Interpretation next()
           This function modifies the Interpretation maintained by this Iterator to the next one and returns it.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interpretation.InterpretationIterator

public Interpretation.InterpretationIterator(java.util.Set<NamedSymbol> sys)

This constructor creates and initializes a new Iterator that can be used to enumerate all possible Interpretations for a given Set of NamedSymbols. Note that this Iterator does not create new Interpretations for each iteration but modifies the one created by this constructor.

Parameters:
sys - the Set of atomic symbols that must have a truth value assigned
Method Detail

hasNext

public boolean hasNext()

This function tests whether there are more, different Interpretations to be enumerated.

Specified by:
hasNext in interface java.util.Iterator<Interpretation>
Returns:
whether the current Interpretation assigns TRUE to every symbol

next

public Interpretation next()

This function modifies the Interpretation maintained by this Iterator to the next one and returns it. The first Interpretation assigns FALSE to every symbol, the last one assigns all true.

Specified by:
next in interface java.util.Iterator<Interpretation>
Returns:
the Interpretation maintained by this Iterator, modified

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<Interpretation>