Added lots of 'final' modifiers to class fields where applicable.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -256,7 +256,7 @@ public class ButtonMenu extends BasicGameState {
|
||||
};
|
||||
|
||||
/** The buttons in the state. */
|
||||
private Button[] buttons;
|
||||
private final Button[] buttons;
|
||||
|
||||
/** The associated MenuButton objects. */
|
||||
private MenuButton[] menuButtons;
|
||||
@@ -548,10 +548,10 @@ public class ButtonMenu extends BasicGameState {
|
||||
};
|
||||
|
||||
/** The text to show on the button. */
|
||||
private String text;
|
||||
private final String text;
|
||||
|
||||
/** The button color. */
|
||||
private Color color;
|
||||
private final Color color;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -594,7 +594,7 @@ public class ButtonMenu extends BasicGameState {
|
||||
private GameContainer container;
|
||||
private StateBasedGame game;
|
||||
private Input input;
|
||||
private int state;
|
||||
private final int state;
|
||||
|
||||
public ButtonMenu(int state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -162,10 +162,10 @@ public class DownloadsMenu extends BasicGameState {
|
||||
/** Search query helper class. */
|
||||
private class SearchQuery implements Runnable {
|
||||
/** The search query. */
|
||||
private String query;
|
||||
private final String query;
|
||||
|
||||
/** The download server. */
|
||||
private DownloadServer server;
|
||||
private final DownloadServer server;
|
||||
|
||||
/** Whether the query was interrupted. */
|
||||
private boolean interrupted = false;
|
||||
@@ -246,7 +246,7 @@ public class DownloadsMenu extends BasicGameState {
|
||||
private GameContainer container;
|
||||
private StateBasedGame game;
|
||||
private Input input;
|
||||
private int state;
|
||||
private final int state;
|
||||
|
||||
public DownloadsMenu(int state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -240,7 +240,7 @@ public class Game extends BasicGameState {
|
||||
private GameContainer container;
|
||||
private StateBasedGame game;
|
||||
private Input input;
|
||||
private int state;
|
||||
private final int state;
|
||||
|
||||
public Game(int state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class GamePauseMenu extends BasicGameState {
|
||||
private GameContainer container;
|
||||
private StateBasedGame game;
|
||||
private Input input;
|
||||
private int state;
|
||||
private final int state;
|
||||
private Game gameState;
|
||||
|
||||
public GamePauseMenu(int state) {
|
||||
|
||||
@@ -68,7 +68,7 @@ public class GameRanking extends BasicGameState {
|
||||
// game-related variables
|
||||
private GameContainer container;
|
||||
private StateBasedGame game;
|
||||
private int state;
|
||||
private final int state;
|
||||
private Input input;
|
||||
|
||||
public GameRanking(int state) {
|
||||
|
||||
@@ -122,7 +122,7 @@ public class MainMenu extends BasicGameState {
|
||||
private GameContainer container;
|
||||
private StateBasedGame game;
|
||||
private Input input;
|
||||
private int state;
|
||||
private final int state;
|
||||
|
||||
public MainMenu(int state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -114,10 +114,10 @@ public class OptionsMenu extends BasicGameState {
|
||||
private static OptionTab[] values = values();
|
||||
|
||||
/** Tab name. */
|
||||
private String name;
|
||||
private final String name;
|
||||
|
||||
/** Options array. */
|
||||
public GameOption[] options;
|
||||
public final GameOption[] options;
|
||||
|
||||
/** Associated tab button. */
|
||||
public MenuButton button;
|
||||
@@ -167,7 +167,7 @@ public class OptionsMenu extends BasicGameState {
|
||||
private StateBasedGame game;
|
||||
private Input input;
|
||||
private Graphics g;
|
||||
private int state;
|
||||
private final int state;
|
||||
|
||||
public OptionsMenu(int state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -209,7 +209,7 @@ public class SongMenu extends BasicGameState {
|
||||
private GameContainer container;
|
||||
private StateBasedGame game;
|
||||
private Input input;
|
||||
private int state;
|
||||
private final int state;
|
||||
|
||||
public SongMenu(int state) {
|
||||
this.state = state;
|
||||
|
||||
@@ -67,7 +67,7 @@ public class Splash extends BasicGameState {
|
||||
private AnimatedValue logoAlpha;
|
||||
|
||||
// game-related variables
|
||||
private int state;
|
||||
private final int state;
|
||||
private GameContainer container;
|
||||
private boolean init = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user