Package net.sf.tweety.logics.pl.util
Class TextfileIterator
- java.lang.Object
-
- net.sf.tweety.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 void
close()
Close file reader (in case no more belief bases should be read)boolean
hasNext()
PlBeliefSet
next()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceBeliefSetIterator<PlFormula,PlBeliefSet>
- Specified by:
hasNext
in interfacejava.util.Iterator<PlBeliefSet>
-
next
public PlBeliefSet next()
- Specified by:
next
in interfaceBeliefSetIterator<PlFormula,PlBeliefSet>
- Specified by:
next
in interfacejava.util.Iterator<PlBeliefSet>
-
close
public void close() throws java.io.IOException
Close file reader (in case no more belief bases should be read)- Throws:
java.io.IOException
- if some IO issue occurs.
-
-