diff --git a/src/itdelatrisu/opsu/GameData.java b/src/itdelatrisu/opsu/GameData.java index 0afcfe7f..1dd3de06 100644 --- a/src/itdelatrisu/opsu/GameData.java +++ b/src/itdelatrisu/opsu/GameData.java @@ -269,6 +269,7 @@ public class GameData { * @param x the center x coordinate * @param y the center y coordinate * @param color the color of the hit object + * @param hitResultType the hit object type * @param curve the slider curve (or null if not applicable) * @param expand whether or not the hit result animation should expand (if applicable) * @param hideResult whether or not to hide the hit result (but still show the other animations) @@ -483,6 +484,7 @@ public class GameData { /** * Sets the array of hit result offsets. + * @param hitResultOffset the time offset array (of size {@link #HIT_MAX}) */ public void setHitResultOffset(int[] hitResultOffset) { this.hitResultOffset = hitResultOffset; } diff --git a/src/itdelatrisu/opsu/NativeLoader.java b/src/itdelatrisu/opsu/NativeLoader.java index 6984baf0..4f6853ca 100644 --- a/src/itdelatrisu/opsu/NativeLoader.java +++ b/src/itdelatrisu/opsu/NativeLoader.java @@ -46,7 +46,7 @@ public class NativeLoader { /** * Unpacks natives for the current operating system to the natives directory. - * @throws IOException + * @throws IOException if an I/O exception occurs */ public void loadNatives() throws IOException { if (!nativeDir.exists()) diff --git a/src/itdelatrisu/opsu/ScoreData.java b/src/itdelatrisu/opsu/ScoreData.java index 3f01bf9b..52389ea3 100644 --- a/src/itdelatrisu/opsu/ScoreData.java +++ b/src/itdelatrisu/opsu/ScoreData.java @@ -137,14 +137,14 @@ public class ScoreData implements Comparable { } /** - * Empty constructor. + * Creates an empty score data object. */ public ScoreData() {} /** - * Constructor. - * @param rs the ResultSet to read from (at the current cursor position) - * @throws SQLException + * Builds a score data object from a database result set. + * @param rs the {@link ResultSet} to read from (at the current cursor position) + * @throws SQLException if a database access error occurs or the result set is closed */ public ScoreData(ResultSet rs) throws SQLException { this.timestamp = rs.getLong(1); diff --git a/src/itdelatrisu/opsu/Utils.java b/src/itdelatrisu/opsu/Utils.java index 2c6efcfb..6b8b6829 100644 --- a/src/itdelatrisu/opsu/Utils.java +++ b/src/itdelatrisu/opsu/Utils.java @@ -60,7 +60,6 @@ import org.lwjgl.opengl.GL11; import org.newdawn.slick.Animation; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Input; -import org.newdawn.slick.SlickException; import org.newdawn.slick.state.StateBasedGame; import org.newdawn.slick.util.Log; @@ -93,10 +92,8 @@ public class Utils { * Initializes game settings and class data. * @param container the game container * @param game the game object - * @throws SlickException */ - public static void init(GameContainer container, StateBasedGame game) - throws SlickException { + public static void init(GameContainer container, StateBasedGame game) { input = container.getInput(); int width = container.getWidth(); int height = container.getHeight(); @@ -368,6 +365,7 @@ public class Utils { * @param url the remote URL * @return the contents as a string, or null if any error occurred * @author Roland Illig (http://stackoverflow.com/a/4308662) + * @throws IOException if an I/O exception occurs */ public static String readDataFromUrl(URL url) throws IOException { // open connection @@ -403,6 +401,7 @@ public class Utils { * Returns a JSON object from a URL. * @param url the remote URL * @return the JSON object, or null if an error occurred + * @throws IOException if an I/O exception occurs */ public static JSONObject readJsonObjectFromUrl(URL url) throws IOException { String s = Utils.readDataFromUrl(url); @@ -421,6 +420,7 @@ public class Utils { * Returns a JSON array from a URL. * @param url the remote URL * @return the JSON array, or null if an error occurred + * @throws IOException if an I/O exception occurs */ public static JSONArray readJsonArrayFromUrl(URL url) throws IOException { String s = Utils.readDataFromUrl(url); diff --git a/src/itdelatrisu/opsu/audio/MultiClip.java b/src/itdelatrisu/opsu/audio/MultiClip.java index 06e7ae22..f4f18ac9 100644 --- a/src/itdelatrisu/opsu/audio/MultiClip.java +++ b/src/itdelatrisu/opsu/audio/MultiClip.java @@ -55,6 +55,9 @@ public class MultiClip { * Constructor. * @param name the clip name * @param audioIn the associated AudioInputStream + * @throws IOException if an input or output error occurs + * @throws LineUnavailableException if a clip object is not available or + * if the line cannot be opened due to resource restrictions */ public MultiClip(String name, AudioInputStream audioIn) throws IOException, LineUnavailableException { this.name = name; @@ -105,6 +108,8 @@ public class MultiClip { * Plays the clip with the specified volume. * @param volume the volume the play at * @param listener the line listener + * @throws LineUnavailableException if a clip object is not available or + * if the line cannot be opened due to resource restrictions */ public void start(float volume, LineListener listener) throws LineUnavailableException { Clip clip = getClip(); @@ -130,6 +135,8 @@ public class MultiClip { * If no clip is available, then a new one is created if under MAX_CLIPS. * Otherwise, an existing clip will be returned. * @return the Clip to play + * @throws LineUnavailableException if a clip object is not available or + * if the line cannot be opened due to resource restrictions */ private Clip getClip() throws LineUnavailableException { // TODO: diff --git a/src/itdelatrisu/opsu/audio/MusicController.java b/src/itdelatrisu/opsu/audio/MusicController.java index 4f1f04e9..c5aac333 100644 --- a/src/itdelatrisu/opsu/audio/MusicController.java +++ b/src/itdelatrisu/opsu/audio/MusicController.java @@ -230,6 +230,7 @@ public class MusicController { /** * Fades out the track. + * @param duration the fade time (in ms) */ public static void fadeOut(int duration) { if (isPlaying()) diff --git a/src/itdelatrisu/opsu/beatmap/BeatmapParser.java b/src/itdelatrisu/opsu/beatmap/BeatmapParser.java index ec122052..7a56a1b2 100644 --- a/src/itdelatrisu/opsu/beatmap/BeatmapParser.java +++ b/src/itdelatrisu/opsu/beatmap/BeatmapParser.java @@ -728,6 +728,7 @@ public class BeatmapParser { /** * Returns the file extension of a file. + * @param file the file name */ public static String getExtension(String file) { int i = file.lastIndexOf('.'); diff --git a/src/itdelatrisu/opsu/beatmap/BeatmapSet.java b/src/itdelatrisu/opsu/beatmap/BeatmapSet.java index 9152438b..2cffa823 100644 --- a/src/itdelatrisu/opsu/beatmap/BeatmapSet.java +++ b/src/itdelatrisu/opsu/beatmap/BeatmapSet.java @@ -47,7 +47,7 @@ public class BeatmapSet implements Iterable { /** * Returns the beatmap at the given index. * @param index the beatmap index - * @throws IndexOutOfBoundsException + * @throws IndexOutOfBoundsException if the index is out of range */ public Beatmap get(int index) { return beatmaps.get(index); } @@ -55,7 +55,7 @@ public class BeatmapSet implements Iterable { * Removes the beatmap at the given index. * @param index the beatmap index * @return the removed beatmap - * @throws IndexOutOfBoundsException + * @throws IndexOutOfBoundsException if the index is out of range */ public Beatmap remove(int index) { return beatmaps.remove(index); } @@ -72,7 +72,7 @@ public class BeatmapSet implements Iterable { *
  • 4: CS:{} HP:{} AR:{} OD:{} Stars:{} * * @param index the beatmap index - * @throws IndexOutOfBoundsException + * @throws IndexOutOfBoundsException if the index is out of range */ public String[] getInfo(int index) { Beatmap beatmap = beatmaps.get(index); diff --git a/src/itdelatrisu/opsu/beatmap/BeatmapSetList.java b/src/itdelatrisu/opsu/beatmap/BeatmapSetList.java index 3960856e..7a0efdd9 100644 --- a/src/itdelatrisu/opsu/beatmap/BeatmapSetList.java +++ b/src/itdelatrisu/opsu/beatmap/BeatmapSetList.java @@ -330,6 +330,7 @@ public class BeatmapSetList { /** * Expands the node at an index by inserting a new node for each Beatmap * in that node and hiding the group node. + * @param index the node index * @return the first of the newly-inserted nodes */ public BeatmapSetNode expand(int index) { diff --git a/src/itdelatrisu/opsu/beatmap/BeatmapWatchService.java b/src/itdelatrisu/opsu/beatmap/BeatmapWatchService.java index e63482cf..8399cc22 100644 --- a/src/itdelatrisu/opsu/beatmap/BeatmapWatchService.java +++ b/src/itdelatrisu/opsu/beatmap/BeatmapWatchService.java @@ -129,7 +129,11 @@ public class BeatmapWatchService { /** Watch service listener interface. */ public interface BeatmapWatchServiceListener { - /** Indication that an event was received. */ + /** + * Indication that an event was received. + * @param kind the event kind + * @param child the child directory + */ public void eventReceived(WatchEvent.Kind kind, Path child); } diff --git a/src/itdelatrisu/opsu/downloads/DownloadList.java b/src/itdelatrisu/opsu/downloads/DownloadList.java index 2c396c9b..dfeac328 100644 --- a/src/itdelatrisu/opsu/downloads/DownloadList.java +++ b/src/itdelatrisu/opsu/downloads/DownloadList.java @@ -75,7 +75,7 @@ public class DownloadList { } /** - * Returns the size of the doownloads list. + * Returns the size of the downloads list. */ public int size() { return nodes.size(); } diff --git a/src/itdelatrisu/opsu/downloads/DownloadNode.java b/src/itdelatrisu/opsu/downloads/DownloadNode.java index 4205f058..b530a528 100644 --- a/src/itdelatrisu/opsu/downloads/DownloadNode.java +++ b/src/itdelatrisu/opsu/downloads/DownloadNode.java @@ -218,6 +218,13 @@ public class DownloadNode { /** * Constructor. + * @param beatmapSetID the beatmap set ID + * @param date the last modified date string + * @param title the song title + * @param titleUnicode the Unicode song title (or {@code null} if none) + * @param artist the song artist + * @param artistUnicode the Unicode song artist (or {@code null} if none) + * @param creator the beatmap creator */ public DownloadNode(int beatmapSetID, String date, String title, String titleUnicode, String artist, String artistUnicode, String creator) { diff --git a/src/itdelatrisu/opsu/downloads/Updater.java b/src/itdelatrisu/opsu/downloads/Updater.java index 25adb7a3..165d810a 100644 --- a/src/itdelatrisu/opsu/downloads/Updater.java +++ b/src/itdelatrisu/opsu/downloads/Updater.java @@ -194,6 +194,7 @@ public class Updater { /** * Checks the program version against the version file on the update server. + * @throws IOException if an I/O exception occurs */ public void checkForUpdates() throws IOException { if (status != Status.INITIAL || Options.USE_XDG) diff --git a/src/itdelatrisu/opsu/io/OsuReader.java b/src/itdelatrisu/opsu/io/OsuReader.java index 0cf84dcd..8af11c72 100644 --- a/src/itdelatrisu/opsu/io/OsuReader.java +++ b/src/itdelatrisu/opsu/io/OsuReader.java @@ -61,6 +61,7 @@ public class OsuReader { /** * Closes the input stream. + * @throws IOException if an I/O error occurs */ public void close() throws IOException { reader.close(); } diff --git a/src/itdelatrisu/opsu/io/OsuWriter.java b/src/itdelatrisu/opsu/io/OsuWriter.java index 91b2efce..92d32d54 100644 --- a/src/itdelatrisu/opsu/io/OsuWriter.java +++ b/src/itdelatrisu/opsu/io/OsuWriter.java @@ -62,7 +62,7 @@ public class OsuWriter { /** * Closes the output stream. - * @throws IOException + * @throws IOException if an I/O error occurs */ public void close() throws IOException { writer.close(); } diff --git a/src/itdelatrisu/opsu/replay/ReplayFrame.java b/src/itdelatrisu/opsu/replay/ReplayFrame.java index 8f6e5095..28233a7f 100644 --- a/src/itdelatrisu/opsu/replay/ReplayFrame.java +++ b/src/itdelatrisu/opsu/replay/ReplayFrame.java @@ -81,7 +81,8 @@ public class ReplayFrame { public int getTimeDiff() { return timeDiff; } /** - * Sets the time since the previous action, in milliseconds. + * Sets the time since the previous action. + * @param diff the time difference, in milliseconds */ public void setTimeDiff(int diff) { this.timeDiff = diff; } diff --git a/src/itdelatrisu/opsu/ui/DropdownMenu.java b/src/itdelatrisu/opsu/ui/DropdownMenu.java index a75d0d9a..4cfb8854 100644 --- a/src/itdelatrisu/opsu/ui/DropdownMenu.java +++ b/src/itdelatrisu/opsu/ui/DropdownMenu.java @@ -43,6 +43,8 @@ import org.newdawn.slick.gui.GUIContext; *
  • Call {@link #activate()}/{@link #deactivate()} whenever the component is needed * (e.g. in a state's {@code enter} and {@code leave} events. * + * + * @param the type of the elements in the menu */ public class DropdownMenu extends AbstractComponent { /** Padding ratios for drawing. */ diff --git a/src/itdelatrisu/opsu/ui/MenuButton.java b/src/itdelatrisu/opsu/ui/MenuButton.java index 99c454f2..1aa524dc 100644 --- a/src/itdelatrisu/opsu/ui/MenuButton.java +++ b/src/itdelatrisu/opsu/ui/MenuButton.java @@ -146,11 +146,13 @@ public class MenuButton { /** * Sets a new center x coordinate. + * @param x the x coordinate */ public void setX(float x) { this.x = x; } /** * Sets a new center y coordinate. + * @param y the y coordinate */ public void setY(float y) { this.y = y; } diff --git a/src/itdelatrisu/opsu/ui/UI.java b/src/itdelatrisu/opsu/ui/UI.java index ec9195b3..dfe8116d 100644 --- a/src/itdelatrisu/opsu/ui/UI.java +++ b/src/itdelatrisu/opsu/ui/UI.java @@ -38,7 +38,6 @@ import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Image; import org.newdawn.slick.Input; -import org.newdawn.slick.SlickException; import org.newdawn.slick.state.StateBasedGame; /** @@ -86,10 +85,8 @@ public class UI { * Initializes UI data. * @param container the game container * @param game the game object - * @throws SlickException */ - public static void init(GameContainer container, StateBasedGame game) - throws SlickException { + public static void init(GameContainer container, StateBasedGame game) { UI.container = container; UI.input = container.getInput(); @@ -271,8 +268,9 @@ public class UI { } /** - * Draws loading progress (OSZ unpacking, beatmap parsing, sound loading) + * Draws loading progress (OSZ unpacking, beatmap parsing, replay importing, sound loading) * at the bottom of the screen. + * @param g the graphics context */ public static void drawLoadingProgress(Graphics g) { String text, file;