Package org.tweetyproject.logics.pl.util
Class TextfileIterator
- java.lang.Object
 - 
- org.tweetyproject.logics.pl.util.TextfileIterator
 
 
- 
- All Implemented Interfaces:
 java.util.Iterator<PlBeliefSet>,BeliefSetIterator<PlFormula,PlBeliefSet>
public class TextfileIterator extends java.lang.Object implements BeliefSetIterator<PlFormula,PlBeliefSet>
Enumerates all belief bases from a text file; the file contains one belief base per line.- Author:
 - Matthias Thimm
 
 
- 
- 
Constructor Summary
Constructors Constructor Description TextfileIterator(java.lang.String pathToFile)Creates a new iterator based on the given file. 
- 
Method Summary
Modifier and Type Method Description voidclose()Close file reader (in case no more belief bases should be read)booleanhasNext()PlBeliefSetnext() 
 - 
 
- 
- 
Method Detail
- 
hasNext
public boolean hasNext()
- Specified by:
 hasNextin interfaceBeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
 hasNextin interfacejava.util.Iterator<PlBeliefSet>
 
- 
next
public PlBeliefSet next()
- Specified by:
 nextin interfaceBeliefSetIterator<PlFormula,PlBeliefSet>- Specified by:
 nextin interfacejava.util.Iterator<PlBeliefSet>
 
- 
close
public void close() throws java.io.IOExceptionClose file reader (in case no more belief bases should be read)- Throws:
 java.io.IOException- if some IO issue occurs.
 
 - 
 
 -