Fixed build. (Actually this time)

All doc string annotations were required to be fixed for all methods

tags: #issue[34]
This commit is contained in:
William Muir
2017-08-03 11:45:14 +12:00
parent 8e24c204fd
commit c655cb3fab
10 changed files with 24 additions and 4 deletions
@@ -12,9 +12,16 @@ public class MarkRoundingMessage extends Message{
private RoundingSide roundingSide; private RoundingSide roundingSide;
private long markId; private long markId;
/** /**
* This message is sent when a boat passes a mark, start line, or finish line * This message is sent when a boat passes a mark, start line, or finish line
* The purpose of this is to record the time when yachts cross marks * The purpose of this is to record the time when yachts cross marks
* @param ackNumber ackNumber
* @param raceId raceId
* @param sourceId sourceId
* @param roundingBoatStatus roundingBoatStatus
* @param roundingSide roundingSide
* @param markId markId
*/ */
public MarkRoundingMessage(int ackNumber, int raceId, int sourceId, RoundingBoatStatus roundingBoatStatus, public MarkRoundingMessage(int ackNumber, int raceId, int sourceId, RoundingBoatStatus roundingBoatStatus,
RoundingSide roundingSide, int markId){ RoundingSide roundingSide, int markId){
@@ -172,7 +172,7 @@ public abstract class Message {
* Convert an integer to an array of bytes * Convert an integer to an array of bytes
* @param val The value to add * @param val The value to add
* @param len The width of the integer in the buffer * @param len The width of the integer in the buffer
* @return * @return A byte array to be sent
*/ */
public static byte[] intToByteArray(long val, int len){ public static byte[] intToByteArray(long val, int len){
int index = 0; int index = 0;
@@ -191,6 +191,7 @@ public abstract class Message {
* takes an array of up to 7 bytes in little endian format and * takes an array of up to 7 bytes in little endian format and
* returns a positive long constructed from the input bytes * returns a positive long constructed from the input bytes
* *
* @param bytes the bytes to be converted to long
* @return a positive long if there is less than 8 bytes -1 otherwise * @return a positive long if there is less than 8 bytes -1 otherwise
*/ */
public static long bytesToLong(byte[] bytes){ public static long bytesToLong(byte[] bytes){
@@ -17,6 +17,7 @@ public class XMLMessage extends Message{
* XML Message from the AC35 Streaming data spec * XML Message from the AC35 Streaming data spec
* @param content The XML content * @param content The XML content
* @param type The XML Message Sub Type * @param type The XML Message Sub Type
* @param sequenceNum sequenceNum
*/ */
public XMLMessage(String content, XMLMessageSubType type, long sequenceNum){ public XMLMessage(String content, XMLMessageSubType type, long sequenceNum){
this.content = content; this.content = content;
@@ -26,6 +26,7 @@ public final class PolarTable {
* Iterates through each row of the polar table, in pairs, to extract the row into a hashmap of angle to boat speed. * Iterates through each row of the polar table, in pairs, to extract the row into a hashmap of angle to boat speed.
* These angle boatspeed hashmaps are then added to an outer hashmap at the end of wind speed key to each row hashmap * These angle boatspeed hashmaps are then added to an outer hashmap at the end of wind speed key to each row hashmap
* as a value * as a value
* @param polarFile polarFile to be parsed
*/ */
public static void parsePolarFile(InputStream polarFile) { public static void parsePolarFile(InputStream polarFile) {
polarTable = new HashMap<>(); polarTable = new HashMap<>();
+5 -2
View File
@@ -85,8 +85,10 @@ public class Yacht {
/** /**
* Used in EventTest and RaceTest. * Used in EventTest and RaceTest.
* * @param boatName boatName
* @param boatName Create a yacht object with name. * @param shortName shortName
* @param location location
* @param heading heading
*/ */
public Yacht(String boatName, String shortName, GeoPoint location, Double heading) { public Yacht(String boatName, String shortName, GeoPoint location, Double heading) {
this.boatName = boatName; this.boatName = boatName;
@@ -103,6 +105,7 @@ public class Yacht {
* @param boatName The name of the team sailing the boat * @param boatName The name of the team sailing the boat
* @param boatVelocity The speed of the boat in meters/second * @param boatVelocity The speed of the boat in meters/second
* @param shortName A shorter version of the teams name * @param shortName A shorter version of the teams name
* @param id The id for the yacht
*/ */
public Yacht(String boatName, double boatVelocity, String shortName, int id) { public Yacht(String boatName, double boatVelocity, String shortName, int id) {
this.boatName = boatName; this.boatName = boatName;
@@ -413,6 +413,7 @@ public class StreamParser {
* takes an array of up to 7 bytes and returns a positive * takes an array of up to 7 bytes and returns a positive
* long constructed from the input bytes * long constructed from the input bytes
* *
* @param bytes the byte array to conver to Long
* @return a positive long if there is less than 7 bytes -1 otherwise * @return a positive long if there is less than 7 bytes -1 otherwise
*/ */
public static long bytesToLong(byte[] bytes) { public static long bytesToLong(byte[] bytes) {
@@ -64,7 +64,7 @@ public class ClientToServerThread implements Runnable {
* *
* @param ipAddress a string of ip address to be connected to * @param ipAddress a string of ip address to be connected to
* @param portNumber an integer port number * @param portNumber an integer port number
* @throws Exception SocketConnection if fail to connect to ip address and port number * @throws IOException SocketConnection if fail to connect to ip address and port number
* combination * combination
*/ */
public ClientToServerThread(String ipAddress, Integer portNumber) throws IOException { public ClientToServerThread(String ipAddress, Integer portNumber) throws IOException {
@@ -182,6 +182,7 @@ public class ClientToServerThread implements Runnable {
/** /**
* Send the post-start race course information * Send the post-start race course information
* @param boatActionMessage The message to send
*/ */
public void sendBoatActionMessage(BoatActionMessage boatActionMessage) { public void sendBoatActionMessage(BoatActionMessage boatActionMessage) {
try { try {
@@ -277,6 +277,7 @@ public class GameClient {
/** /**
* Handle the key-pressed event from the text field. * Handle the key-pressed event from the text field.
* @param e The key event triggering this call
*/ */
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
BoatActionMessage boatActionMessage; BoatActionMessage boatActionMessage;
@@ -183,6 +183,7 @@ public class GameView extends Pane {
* case the course is added relative ot the border. * case the course is added relative ot the border.
* *
* @param newCourse the mark objects that make up the course. * @param newCourse the mark objects that make up the course.
* @param sequence The sequence the marks travel through
*/ */
public void updateCourse(List<CompoundMark> newCourse, List<Corner> sequence) { public void updateCourse(List<CompoundMark> newCourse, List<Corner> sequence) {
markerObjects = new HashMap<>(); markerObjects = new HashMap<>();
@@ -307,6 +308,7 @@ public class GameView extends Pane {
/** /**
* Draws all the boats. * Draws all the boats.
* @param yachts The yachts to set in the race
*/ */
public void setBoats(List<Yacht> yachts) { public void setBoats(List<Yacht> yachts) {
BoatObject newBoat; BoatObject newBoat;
@@ -108,6 +108,8 @@ public class BoatObject extends Group {
* *
* @param x The X coordinate to move the boat to * @param x The X coordinate to move the boat to
* @param y The Y coordinate to move the boat to * @param y The Y coordinate to move the boat to
* @param rotation The rotation by which the boat moves
* @param velocity The velocity the boat is moving
*/ */
public void moveTo(double x, double y, double rotation, double velocity) { public void moveTo(double x, double y, double rotation, double velocity) {
Double dx = Math.abs(boatPoly.getLayoutX() - x); Double dx = Math.abs(boatPoly.getLayoutX() - x);