fixed all java doc errors
#story[782]
This commit is contained in:
@@ -117,7 +117,7 @@ public class RaceController extends Controller {
|
||||
* Initializes and runs the race, based on the user's chosen scale factor
|
||||
* Currently uses an example racecourse
|
||||
*
|
||||
* @param visualiserInput
|
||||
* @param visualiserInput input from network
|
||||
*/
|
||||
public void startRace(VisualiserInput visualiserInput) {
|
||||
StreamedRace newRace = new StreamedRace(visualiserInput, this);
|
||||
|
||||
@@ -97,6 +97,7 @@ public class StartController extends Controller implements Observer {
|
||||
|
||||
/**
|
||||
* Countdown timer until race starts. Use PRERACE_TIME to set countdown duration.
|
||||
* @param scaleFactor factor to scale by
|
||||
*/
|
||||
protected void countdownTimer(int scaleFactor) {
|
||||
new AnimationTimer() {
|
||||
|
||||
@@ -29,6 +29,7 @@ public class BoatXMLReader extends XMLReader {
|
||||
* @throws IOException error
|
||||
* @throws SAXException error
|
||||
* @throws ParserConfigurationException error
|
||||
* @throws ParseException error
|
||||
*/
|
||||
public BoatXMLReader(String filePath) throws IOException, SAXException, ParserConfigurationException, ParseException {
|
||||
this(filePath, true);
|
||||
@@ -41,6 +42,7 @@ public class BoatXMLReader extends XMLReader {
|
||||
* @throws IOException error
|
||||
* @throws SAXException error
|
||||
* @throws ParserConfigurationException error
|
||||
* @throws ParseException error
|
||||
*/
|
||||
public BoatXMLReader(String filePath, boolean read) throws IOException, SAXException, ParserConfigurationException, ParseException {
|
||||
super(filePath);
|
||||
@@ -49,6 +51,13 @@ public class BoatXMLReader extends XMLReader {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for Boat XML Reader
|
||||
* @param xmlString sting to read
|
||||
* @throws IOException error
|
||||
* @throws SAXException error
|
||||
* @throws ParserConfigurationException error
|
||||
*/
|
||||
public BoatXMLReader(InputStream xmlString) throws IOException, SAXException, ParserConfigurationException {
|
||||
super(xmlString);
|
||||
read();
|
||||
|
||||
@@ -46,6 +46,8 @@ public class StreamedCourseXMLReader extends XMLReader {
|
||||
* @throws IOException error
|
||||
* @throws SAXException error
|
||||
* @throws ParserConfigurationException error
|
||||
* @throws ParseException error
|
||||
* @throws StreamedCourseXMLException error
|
||||
*/
|
||||
public StreamedCourseXMLReader(String filePath) throws IOException, SAXException, ParserConfigurationException, ParseException, StreamedCourseXMLException {
|
||||
this(filePath, true);
|
||||
@@ -58,6 +60,8 @@ public class StreamedCourseXMLReader extends XMLReader {
|
||||
* @throws IOException error
|
||||
* @throws SAXException error
|
||||
* @throws ParserConfigurationException error
|
||||
* @throws ParseException error
|
||||
* @throws StreamedCourseXMLException error
|
||||
*/
|
||||
public StreamedCourseXMLReader(String filePath, boolean read) throws IOException, SAXException, ParserConfigurationException, ParseException, StreamedCourseXMLException {
|
||||
super(filePath);
|
||||
@@ -66,17 +70,35 @@ public class StreamedCourseXMLReader extends XMLReader {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for Streamed Race XML
|
||||
* @param xmlString string to read
|
||||
* @throws IOException error
|
||||
* @throws SAXException error
|
||||
* @throws ParserConfigurationException error
|
||||
* @throws ParseException error
|
||||
* @throws StreamedCourseXMLException error
|
||||
*/
|
||||
public StreamedCourseXMLReader(InputStream xmlString) throws IOException, SAXException, ParserConfigurationException, ParseException, StreamedCourseXMLException {
|
||||
super(xmlString);
|
||||
read();
|
||||
}
|
||||
|
||||
/**
|
||||
* reads
|
||||
* @throws ParseException error
|
||||
* @throws StreamedCourseXMLException error
|
||||
*/
|
||||
private void read() throws ParseException, StreamedCourseXMLException {
|
||||
readRace();
|
||||
readParticipants();
|
||||
readCourse();
|
||||
}
|
||||
|
||||
/**
|
||||
* reads a race
|
||||
* @throws ParseException error
|
||||
*/
|
||||
private void readRace() throws ParseException {
|
||||
DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
|
||||
Element settings = (Element) doc.getElementsByTagName("Race").item(0);
|
||||
@@ -111,6 +133,10 @@ public class StreamedCourseXMLReader extends XMLReader {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* reads a course
|
||||
* @throws StreamedCourseXMLException error
|
||||
*/
|
||||
private void readCourse() throws StreamedCourseXMLException {
|
||||
readCompoundMarks();
|
||||
readCompoundMarkSequence();
|
||||
|
||||
@@ -59,10 +59,10 @@ public abstract class Race implements Runnable {
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param startingBoats
|
||||
* @param legs
|
||||
* @param controller
|
||||
* @param scaleFactor
|
||||
* @param startingBoats boats starting the race
|
||||
* @param legs legs in race
|
||||
* @param controller controller for the race
|
||||
* @param scaleFactor factor to scale by
|
||||
*/
|
||||
public Race(Boat[] startingBoats, List<Leg> legs, RaceController controller, int scaleFactor) {
|
||||
this(Arrays.asList(startingBoats), legs, controller, scaleFactor);
|
||||
|
||||
@@ -66,7 +66,8 @@ public class RaceClock {
|
||||
|
||||
/**
|
||||
* Get ZonedDateTime corresponding to local time zone and given UTC time.
|
||||
* @param time
|
||||
* @param time time in mills
|
||||
* @return local date time
|
||||
*/
|
||||
public ZonedDateTime getLocalTime(long time) {
|
||||
Date utcTime = new Date(time);
|
||||
|
||||
@@ -23,6 +23,7 @@ public class RaceConnection {
|
||||
|
||||
/**
|
||||
* Tries to create a socket to hostname and port, indicates status after test.
|
||||
* @return true if socket can connect
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public boolean check() {
|
||||
|
||||
@@ -134,7 +134,7 @@ public class VisualiserInput implements Runnable
|
||||
|
||||
/**
|
||||
* Returns get Mark Rounding Boat Source ID, MarkRound
|
||||
* @return
|
||||
* @return the mark rounding
|
||||
*/
|
||||
public Map<Integer, MarkRounding> getMarkRounding() {
|
||||
return markRounding;
|
||||
@@ -145,7 +145,7 @@ public class VisualiserInput implements Runnable
|
||||
* for the whole message then reads that and returns the byte array
|
||||
* @param inStream inputStream from socket
|
||||
* @return encoded binary messsage bytes
|
||||
* @throws IOException
|
||||
* @throws IOException made by the inputstream reading
|
||||
*/
|
||||
private static byte[] getBytes(InputStream inStream) throws IOException {
|
||||
while (inStream.available() < 15){
|
||||
|
||||
Reference in New Issue
Block a user