Class Loader


  • public class Loader
    extends java.lang.Object
    This used to be the Loader class. Now it only supports cloning via cr writing/reading
    Version:
    $Revision: 299 $
    Author:
    $Author: $
    • Constructor Detail

      • Loader

        public Loader()
    • Method Detail

      • cloneGameData

        public GameData cloneGameData​(GameData data)
                               throws java.lang.CloneNotSupportedException
        Creates a clone of the GameData using CRWriter/CRParser
        Parameters:
        data - the given GameData
        Returns:
        a clone of the given GameData
        Throws:
        java.lang.CloneNotSupportedException - if cloning failed
      • cloneGameDataInMemory

        public GameData cloneGameDataInMemory​(GameData data,
                                              ReportTransformer coordinateTranslator)
                                       throws java.lang.CloneNotSupportedException,
                                              java.io.IOException
        Clones the data and translates coordinates.
        Parameters:
        data -
        coordinateTranslator -
        Returns:
        A copy of data, translated by the translator.
        Throws:
        java.lang.CloneNotSupportedException - if cloning failed
        java.io.IOException
      • cloneGameData

        public GameData cloneGameData​(GameData data,
                                      ReportTransformer coordinateTranslator)
                               throws java.lang.CloneNotSupportedException
        Creates a clone of the GameData using CRWriter/CRParser
        Parameters:
        data - the given GameData
        Returns:
        a clone of the given GameData
        Throws:
        java.lang.CloneNotSupportedException - if cloning failed
      • load

        public static GameData load​(java.io.File file)
                             throws java.io.IOException
        This method loads a report file from the given file.
        Throws:
        java.io.IOException