Generic cleanup of warnings, whitespace and style.

This commit is contained in:
Erik Broes
2011-12-25 16:02:30 +01:00
parent d9c22be882
commit dce83b6ce4
257 changed files with 1408 additions and 1152 deletions

View File

@@ -8,37 +8,41 @@ import java.util.List;
* MapCursorCollection is linked to a specific {@link MapRenderer}.
*/
public final class MapCursorCollection {
private List<MapCursor> cursors = new ArrayList<MapCursor>();
/**
* Get the amount of cursors in this collection.
*
* @return The size of this collection.
*/
public int size() {
return cursors.size();
}
/**
* Get a cursor from this collection.
*
* @param index The index of the cursor.
* @return The MapCursor.
*/
public MapCursor getCursor(int index) {
return cursors.get(index);
}
/**
* Remove a cursor from the collection.
*
* @param cursor The MapCursor to remove.
* @return Whether the cursor was removed successfully.
*/
public boolean removeCursor(MapCursor cursor) {
return cursors.remove(cursor);
}
/**
* Add a cursor to the collection.
*
* @param cursor The MapCursor to add.
* @return The MapCursor that was passed.
*/
@@ -46,9 +50,10 @@ public final class MapCursorCollection {
cursors.add(cursor);
return cursor;
}
/**
* Add a cursor to the collection.
*
* @param x The x coordinate, from -128 to 127.
* @param y The y coordinate, from -128 to 127.
* @param direction The facing of the cursor, from 0 to 15.
@@ -57,9 +62,10 @@ public final class MapCursorCollection {
public MapCursor addCursor(int x, int y, byte direction) {
return addCursor(x, y, direction, (byte) 0, true);
}
/**
* Add a cursor to the collection.
*
* @param x The x coordinate, from -128 to 127.
* @param y The y coordinate, from -128 to 127.
* @param direction The facing of the cursor, from 0 to 15.
@@ -69,9 +75,10 @@ public final class MapCursorCollection {
public MapCursor addCursor(int x, int y, byte direction, byte type) {
return addCursor(x, y, direction, type, true);
}
/**
* Add a cursor to the collection.
*
* @param x The x coordinate, from -128 to 127.
* @param y The y coordinate, from -128 to 127.
* @param direction The facing of the cursor, from 0 to 15.
@@ -82,5 +89,5 @@ public final class MapCursorCollection {
public MapCursor addCursor(int x, int y, byte direction, byte type, boolean visible) {
return addCursor(new MapCursor((byte) x, (byte) y, direction, type, visible));
}
}