Package ch.epfl.cs107.play.io
Class XMLTexts
java.lang.Object
ch.epfl.cs107.play.io.XMLTexts
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringXMLTexts map accessor for the given key Stringstatic voidinitialize(FileSystem fileSystem, String textFileName) Initialize the static strings map with strings contained into the given xml file
-
Method Details
-
initialize
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 nulltextFileName- (String): full file name in the format (path/name.xml). Not null - assume the file is a XML one
-
getText
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.
-