Class TextfileIterator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String currentLine
      the last read line
      private java.io.BufferedReader file_reader
      For reading the file
      private PlParser parser
      for parsing belief bases
    • 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Field Detail

      • file_reader

        private java.io.BufferedReader file_reader
        For reading the file
      • currentLine

        private java.lang.String currentLine
        the last read line
      • parser

        private PlParser parser
        for parsing belief bases
    • Constructor Detail

      • TextfileIterator

        public TextfileIterator​(java.lang.String pathToFile)
        Creates a new iterator based on the given file.
        Parameters:
        pathToFile - path to a text file containing belief bases (one per line)