Class FileManager


  • public class FileManager
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FileManager()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static FileManager getInstance()  
      java.util.List<java.lang.String> getLines​(java.lang.String path)
      This method returns the cached lines for the file.
      java.util.List<java.lang.String> getLines​(DictType dictType)  
      java.util.Set<java.lang.String> getUniqueLines​(DictType dictType)  
      java.util.List<java.lang.String> read​(java.lang.String key)  
      java.util.List<java.lang.String> read​(DictType dictType)  
      java.util.List<java.lang.String> read​(MarkovChainType markovChainType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileManager

        public FileManager()
    • Method Detail

      • getInstance

        public static FileManager getInstance()
      • getLines

        public java.util.List<java.lang.String> getLines​(java.lang.String path)
        This method returns the cached lines for the file.
        Parameters:
        path - The path to the file.
        Returns:
        A string containing all the lines from path (cached).
      • getLines

        public java.util.List<java.lang.String> getLines​(DictType dictType)
      • getUniqueLines

        public java.util.Set<java.lang.String> getUniqueLines​(DictType dictType)
      • read

        public java.util.List<java.lang.String> read​(MarkovChainType markovChainType)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public java.util.List<java.lang.String> read​(DictType dictType)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public java.util.List<java.lang.String> read​(java.lang.String key)
                                              throws java.io.IOException
        Throws:
        java.io.IOException