Package util.io

Class VariableBackup


  • public class VariableBackup
    extends java.lang.Object
    Author:
    JIBOYE, OLUWAGBEMIRO OLAOLUWA on 8/17/2016.
    • Constructor Summary

      Constructors 
      Constructor Description
      VariableBackup()  
    • Method Summary

      Modifier and Type Method Description
      static void read​(java.util.Map<java.lang.String,​Variable> map, java.io.File file)
      This reads the lines of text in a file into a Map.
      static void readFileLinesToMap​(java.util.Map<java.lang.String,​Variable> map, java.io.File fileToRead)
      This reads the lines of text in a file into a Map.
      static void writeMapItemsToFileLineByLine​(java.util.Map<java.lang.String,​Variable> map, java.io.File file)
      This writes items on a queue to a file.
      • Methods inherited from class java.lang.Object

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

      • VariableBackup

        public VariableBackup()
    • Method Detail

      • writeMapItemsToFileLineByLine

        public static void writeMapItemsToFileLineByLine​(java.util.Map<java.lang.String,​Variable> map,
                                                         java.io.File file)
        This writes items on a queue to a file. Individual items on the queue ocuupy distinct lines in the file.
        Parameters:
        map - The map of items
        file - The File
      • read

        public static void read​(java.util.Map<java.lang.String,​Variable> map,
                                java.io.File file)
        This reads the lines of text in a file into a Map. Such that individual file lines become individual indexes on the Map.
        Parameters:
        map - A Map
        file - The file
      • readFileLinesToMap

        public static void readFileLinesToMap​(java.util.Map<java.lang.String,​Variable> map,
                                              java.io.File fileToRead)
        This reads the lines of text in a file into a Map. Such that individual file lines become individual indexes on the Map.
        Parameters:
        map - A Map
        fileToRead - The file