From a689ffc6897101e27143e35a1abfeb2dcb8d0d5b Mon Sep 17 00:00:00 2001 From: Erika Savell Date: Thu, 6 Apr 2017 14:31:11 +1200 Subject: [PATCH] Added quick descriptions to params to get javadoc working --- src/main/java/seng302/App.java | 10 +++++----- src/main/java/seng302/Controllers/Controller.java | 10 +++++----- .../java/seng302/Controllers/MainController.java | 4 ++-- src/main/java/seng302/Model/Boat.java | 3 ++- src/main/java/seng302/Model/BoatInRace.java | 5 +++-- .../java/seng302/Model/ConstantVelocityRace.java | 12 ++++++------ src/main/java/seng302/Model/Leg.java | 6 ++++-- src/main/java/seng302/Model/Race.java | 6 ++++-- src/main/java/seng302/Model/ResizableRaceCanvas.java | 8 ++++---- src/main/java/seng302/RaceXMLReader.java | 12 ++++++------ src/test/java/seng302/Model/RaceTest.java | 2 -- 11 files changed, 41 insertions(+), 37 deletions(-) diff --git a/src/main/java/seng302/App.java b/src/main/java/seng302/App.java index 52d21a57..72e98838 100644 --- a/src/main/java/seng302/App.java +++ b/src/main/java/seng302/App.java @@ -19,7 +19,7 @@ public class App extends Application { /** * Entry point for running the programme * - * @param args + * @param args for starting the programme */ public static void main(String[] args) { launch(args); @@ -28,8 +28,8 @@ public class App extends Application { /** * Loads and sets up the GUI elements * - * @param primaryStage - * @throws Exception + * @param primaryStage Base for all scenes + * @throws Exception Error in initialising programme */ @Override public void start(Stage primaryStage) throws Exception { @@ -58,8 +58,8 @@ public class App extends Application { /** * Loads panes for use in the GUI * - * @param fxmlName - * @throws Exception + * @param fxmlName name of resource fxml file + * @throws Exception critical error in loading file */ public void loadPane(String fxmlName) throws Exception { FXMLLoader loader = new FXMLLoader(); diff --git a/src/main/java/seng302/Controllers/Controller.java b/src/main/java/seng302/Controllers/Controller.java index b4feabbb..792acd2c 100644 --- a/src/main/java/seng302/Controllers/Controller.java +++ b/src/main/java/seng302/Controllers/Controller.java @@ -16,7 +16,7 @@ public abstract class Controller implements Initializable { /** * Sets the parent of the application * - * @param parent + * @param parent controller */ public void setParent(App parent) { this.parent = parent; @@ -25,8 +25,8 @@ public abstract class Controller implements Initializable { /** * Sets the loads a pane into the parent. * - * @param fxmlName - * @throws Exception + * @param fxmlName fxml resource file to be loaded + * @throws Exception error in loading file */ public void loadPane(String fxmlName) throws Exception { this.parent.loadPane(fxmlName); @@ -35,8 +35,8 @@ public abstract class Controller implements Initializable { /** * Initialisation class that is run on start up. * - * @param location - * @param resources + * @param location resources location + * @param resources resources bundle */ @Override public abstract void initialize(URL location, ResourceBundle resources); diff --git a/src/main/java/seng302/Controllers/MainController.java b/src/main/java/seng302/Controllers/MainController.java index 5948d827..fe6922a0 100644 --- a/src/main/java/seng302/Controllers/MainController.java +++ b/src/main/java/seng302/Controllers/MainController.java @@ -11,8 +11,8 @@ public class MainController extends Controller { /** * Main Controller for the applications will house the menu and the displayed pane. * - * @param location - * @param resources + * @param location of resources + * @param resources bundle */ @Override public void initialize(URL location, ResourceBundle resources) { diff --git a/src/main/java/seng302/Model/Boat.java b/src/main/java/seng302/Model/Boat.java index 89ed3bcc..49b5a0f9 100644 --- a/src/main/java/seng302/Model/Boat.java +++ b/src/main/java/seng302/Model/Boat.java @@ -18,6 +18,7 @@ public class Boat { * * @param name Name of the Boat. * @param velocity Speed in m/s that the boat travels at. + * @param abbrev nam abbreviation */ public Boat(String name, double velocity, String abbrev) { this.velocity = velocity; @@ -36,7 +37,7 @@ public class Boat { /** * Sets the boat name * - * @param name + * @param name of boat */ public void setName(String name) { this.name.setValue(name); diff --git a/src/main/java/seng302/Model/BoatInRace.java b/src/main/java/seng302/Model/BoatInRace.java index d3086741..544eceb0 100644 --- a/src/main/java/seng302/Model/BoatInRace.java +++ b/src/main/java/seng302/Model/BoatInRace.java @@ -33,6 +33,7 @@ public class BoatInRace extends Boat { * @param name Name of the boat. * @param velocity Speed that the boat travels. * @param colour Colour the boat will be displayed as on the map + * @param abbrev of boat */ public BoatInRace(String name, double velocity, Color colour, String abbrev) { super(name, velocity, abbrev); @@ -112,7 +113,7 @@ public class BoatInRace extends Boat { /** * Sets the boat's scaled velocity * - * @param velocity + * @param velocity of boat */ public void setScaledVelocity(double velocity) { this.scaledVelocity = velocity; @@ -225,7 +226,7 @@ public class BoatInRace extends Boat { /** * Sets whether boat is finished or not * - * @param bool + * @param bool is finished value */ public void setFinished(boolean bool) { this.finished = bool; diff --git a/src/main/java/seng302/Model/ConstantVelocityRace.java b/src/main/java/seng302/Model/ConstantVelocityRace.java index 07da8362..f352308b 100644 --- a/src/main/java/seng302/Model/ConstantVelocityRace.java +++ b/src/main/java/seng302/Model/ConstantVelocityRace.java @@ -16,10 +16,10 @@ public class ConstantVelocityRace extends Race { /** * Initialiser for a constant velocity race * - * @param startingBoats - * @param legs - * @param controller - * @param scaleFactor + * @param startingBoats in race + * @param legs in race + * @param controller of race + * @param scaleFactor of race */ public ConstantVelocityRace(BoatInRace[] startingBoats, ArrayList legs, RaceController controller, int scaleFactor) { super(startingBoats, legs, controller, scaleFactor); @@ -29,8 +29,8 @@ public class ConstantVelocityRace extends Race { /** * Calculates the distance a boat has travelled and updates its current position according to this value. * - * @param boat - * @param millisecondsElapsed + * @param boat to be updated + * @param millisecondsElapsed since last update */ protected void updatePosition(BoatInRace boat, int millisecondsElapsed) { diff --git a/src/main/java/seng302/Model/Leg.java b/src/main/java/seng302/Model/Leg.java index adb26745..2cd45249 100644 --- a/src/main/java/seng302/Model/Leg.java +++ b/src/main/java/seng302/Model/Leg.java @@ -18,6 +18,9 @@ public class Leg { * Leg Initialiser * * @param name Name of the Leg + * @param start marker + * @param end marker + * @param number Leg's position in race */ public Leg(String name, Marker start, Marker end, int number) { this.name = name; @@ -31,6 +34,7 @@ public class Leg { * Construction Method * * @param name Name of the Leg + * @param number leg number */ public Leg(String name, int number) { this.name = name; @@ -86,8 +90,6 @@ public class Leg { /** * Calculates the distance that the legs are in nautical miles (1.852 km). - * - * @return Returns the leg distance. */ public void calculateDistance() { diff --git a/src/main/java/seng302/Model/Race.java b/src/main/java/seng302/Model/Race.java index 2c181089..14679424 100644 --- a/src/main/java/seng302/Model/Race.java +++ b/src/main/java/seng302/Model/Race.java @@ -39,6 +39,8 @@ public abstract class Race implements Runnable { * * @param boats Takes in an array of boats that are participating in the race. * @param legs Number of marks in order that the boats pass in order to complete the race. + * @param controller race controller + * @param scaleFactor for race */ public Race(BoatInRace[] boats, ArrayList legs, RaceController controller, int scaleFactor) { @@ -288,8 +290,8 @@ public abstract class Race implements Runnable { /** * Updates the boat's gps coordinates depending on time elapsed * - * @param boat - * @param millisecondsElapsed + * @param boat to be updated + * @param millisecondsElapsed time since last update */ protected abstract void updatePosition(BoatInRace boat, int millisecondsElapsed); diff --git a/src/main/java/seng302/Model/ResizableRaceCanvas.java b/src/main/java/seng302/Model/ResizableRaceCanvas.java index 00a0d8e1..10c0638d 100644 --- a/src/main/java/seng302/Model/ResizableRaceCanvas.java +++ b/src/main/java/seng302/Model/ResizableRaceCanvas.java @@ -31,7 +31,7 @@ public class ResizableRaceCanvas extends Canvas { /** * Sets the boats that are to be displayed in this race. * - * @param boats + * @param boats in race */ public void setBoats(BoatInRace[] boats) { this.boats = boats; @@ -62,7 +62,7 @@ public class ResizableRaceCanvas extends Canvas { /** * Sets the RaceMap that the RaceCanvas is to be displaying for. * - * @param map + * @param map race map */ public void setMap(RaceMap map) { this.map = map; @@ -319,7 +319,7 @@ public class ResizableRaceCanvas extends Canvas { /** * Returns the preferred width of the Canvas * - * @param width + * @param width of canvas * @return Returns the width of the Canvas */ @Override @@ -330,7 +330,7 @@ public class ResizableRaceCanvas extends Canvas { /** * Returns the preferred height of the Canvas * - * @param height + * @param height of canvas * @return Returns the height of the Canvas */ @Override diff --git a/src/main/java/seng302/RaceXMLReader.java b/src/main/java/seng302/RaceXMLReader.java index 5faa68c7..d99102ce 100644 --- a/src/main/java/seng302/RaceXMLReader.java +++ b/src/main/java/seng302/RaceXMLReader.java @@ -27,9 +27,9 @@ public class RaceXMLReader extends XMLReader { /** * Constractor for Race XML * @param filePath path of the file - * @throws IOException - * @throws SAXException - * @throws ParserConfigurationException + * @throws IOException error + * @throws SAXException error + * @throws ParserConfigurationException error */ public RaceXMLReader(String filePath) throws IOException, SAXException, ParserConfigurationException { this(filePath, true); @@ -39,9 +39,9 @@ public class RaceXMLReader extends XMLReader { * COnstructor for Race XML * @param filePath file path to read * @param read whether or not to read and store the files straight away. - * @throws IOException - * @throws SAXException - * @throws ParserConfigurationException + * @throws IOException error + * @throws SAXException error + * @throws ParserConfigurationException error */ public RaceXMLReader(String filePath, boolean read) throws IOException, SAXException, ParserConfigurationException { super(filePath); diff --git a/src/test/java/seng302/Model/RaceTest.java b/src/test/java/seng302/Model/RaceTest.java index 915d5df4..74215983 100644 --- a/src/test/java/seng302/Model/RaceTest.java +++ b/src/test/java/seng302/Model/RaceTest.java @@ -37,7 +37,6 @@ public class RaceTest { assertTrue(System.currentTimeMillis() - timeStarted < 4000); } - @Test public void checkPositionUpdatesNumberFinishedBoats() { @@ -75,7 +74,6 @@ public class RaceTest { assertEquals(race.boatsFinished, 0); } - @Test public void distanceTravelledBeforeUpdatingLegIsRetained() {