Package org.tweetyproject.logics.pl.util
Class TextfileIterator
java.lang.Object
org.tweetyproject.logics.pl.util.TextfileIterator
- All Implemented Interfaces:
 Iterator<PlBeliefSet>,BeliefSetIterator<PlFormula,PlBeliefSet>
Enumerates all belief bases from a text file; the file contains one
 belief base per line.
- Author:
 - Matthias Thimm
 
- 
Constructor Summary
ConstructorsConstructorDescriptionTextfileIterator(String pathToFile)Creates a new iterator based on the given file. - 
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove 
- 
Constructor Details
- 
TextfileIterator
Creates a new iterator based on the given file.- Parameters:
 pathToFile- path to a text file containing belief bases (one per line)
 
 - 
 - 
Method Details
- 
hasNext
public boolean hasNext()- Specified by:
 hasNextin interfaceBeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
 hasNextin interfaceIterator<PlBeliefSet>
 - 
next
- Specified by:
 nextin interfaceBeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
 nextin interfaceIterator<PlBeliefSet>
 - 
close
Close file reader (in case no more belief bases should be read)- Throws:
 IOException- if some IO issue occurs.
 
 -