Class XMLTexts

java.lang.Object
ch.epfl.cs107.play.io.XMLTexts

public final class XMLTexts extends Object
  • Method Details

    • initialize

      public static void initialize(FileSystem fileSystem, String textFileName)
      Initialize the static strings map with strings contained into the given xml file
      Parameters:
      fileSystem - (FileSystem): given file system used to read the given file name. Not null
      textFileName - (String): full file name in the format (path/name.xml). Not null - assume the file is a XML one
    • getText

      public static String getText(String key)
      XMLTexts map accessor for the given key String
      Parameters:
      key - (String): the key we want the value for
      Returns:
      (String): the value corresponding to the given key if exists or an empty string otherwise.