added all javadocs to class Track

This commit is contained in:
Leonardo Brandenberger 2022-03-24 17:26:44 +01:00
parent 31ec1e9e64
commit 2b2834f47a
1 changed files with 5 additions and 4 deletions

View File

@ -66,8 +66,8 @@ public class Track implements TrackSpecification {
private ConfigSpecification.SpaceType finishTyp;
/**
* Initialize a Track from the given track file.
*
* Initializes the Track from the given track File including the cars.
* Throws an corresponding error if one of the conditions are not met to build a track.
* @param trackFile Reference to a file containing the track data
* @throws FileNotFoundException if the given track file could not be found
* @throws InvalidTrackFormatException if the track file contains invalid data (no tracklines, ...)
@ -123,10 +123,11 @@ public class Track implements TrackSpecification {
}
}
//TODO: THIS
//TODO: SAVE Finish somewhere maybe?
/**
* Checks if there is a finish line in the track if there is no finish line found throws a Exception.
*
* @throws InvalidTrackFormatException
* @throws InvalidTrackFormatException if there is no finish Line found in the track
*/
private void findFinish() throws InvalidTrackFormatException {
for (int i = 0; i < track.size(); i++) {