public interface FileControlInterface
Modifier and Type | Method and Description |
---|---|
boolean |
checkFileIntegrity(List<String> controls)
Check if a file has all the requirements to be considered as valid.
|
MapArea |
initializeMap(List<String> fileContent)
Initialize a new map thanks to the command file.
|
Map<Mower,String> |
loadMowers(List<String> fileContent,
MapArea map)
Load the mowers and their corresponding commands line from file.
|
List<String> |
readFile(String fileLocation)
Read the file and returns the commands list.
|
List<String> readFile(String fileLocation) throws IOException
fileLocation
- the file pathIOException
- if the file doesn't exists.boolean checkFileIntegrity(List<String> controls) throws MowerInstructionFileException
controls
- the commands value to checkMowerInstructionFileException
- if it contains an error.MapArea initializeMap(List<String> fileContent) throws MowerInstructionFileException
fileContent
- the commands to use to create the mapMowerInstructionFileException
- if file is mal formattedMap<Mower,String> loadMowers(List<String> fileContent, MapArea map)
fileContent
- the commands to use to load the mowersmap
- the map where the mowers will progressCopyright © 2016. All Rights Reserved.