Skip to content

Commit ed86f88

Browse files
committed
fix: fixed errors and warnings of Javadocs
1 parent dd1c39e commit ed86f88

39 files changed

Lines changed: 86 additions & 67 deletions

src/main/java/it/polimi/ingsw/client/Cell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public int getWorkerNum() {
3535
* Method setWorkerNum sets the workerNum of this Cell object.
3636
*
3737
* @param workerNum of type int - the workerNum of this Cell object.
38-
* @throws IllegalArgumentException when if workerNum <0 || workerNum>2.
38+
* @throws IllegalArgumentException when if workerNum &lt;0 || workerNum&gt;2.
3939
*/
4040
public void setWorkerNum(int workerNum) throws IllegalArgumentException { //0 -> no worker; 1 -> worker n1;
4141
// 2 -> worker n2

src/main/java/it/polimi/ingsw/client/ClientBoard.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ private void setWorkerNumColors(
178178
* @param row of type int - the row of the selected row.
179179
* @param col of type int - the column of the selected column.
180180
* @param dome of type boolean true if worker wants to build a dome instead of a block. (Only for Atlas workers)
181+
* @param action of type Action - the type of action.
181182
*/
182183
public void build(int row, int col, boolean dome, Action action) {
183184
if(!action.equals(Action.BUILD)){

src/main/java/it/polimi/ingsw/client/ConnectionSocket.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public ConnectionSocket() {
5050
* @param modelView of type ModelView - the structure, stored into the client, containing simple
5151
* logic of the model.
5252
* @param actionHandler of type ActionHandler - the class handling the answers.
53+
* @return boolean true if connection is successful, false otherwise.
5354
* @throws DuplicateNicknameException when the nickname is already in use.
5455
* @throws InvalidNicknameException when the nickname contains illegal characters (like "-").
5556
*/

src/main/java/it/polimi/ingsw/client/InputChecker.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public InputChecker(ConnectionSocket connection, ModelView modelView) {
4848

4949

5050
/**
51-
* Method desc validates a "GODDESC <god-name>" message type.
51+
* Method desc validates a "GODDESC &lt;god-name&gt;" message type.
5252
*
5353
* @param in of type String[] - the user input under array representation.
5454
* @return ChallengerPhaseAction - the correct ChallengerPhaseAction, null otherwise.
@@ -66,7 +66,7 @@ public ChallengerPhaseAction desc(String[] in) {
6666
}
6767

6868
/**
69-
* Method addGod validates an "ADDGOD <god-name>" message type.
69+
* Method addGod validates an "ADDGOD &lt;god-name&gt;" message type.
7070
*
7171
* @param in of type String[] - the user input under array representation.
7272
* @return ChallengerPhaseAction - the correct ChallengerPhaseAction, null otherwise.
@@ -84,7 +84,7 @@ public ChallengerPhaseAction addGod(String[] in) {
8484

8585

8686
/**
87-
* Method choose validates a "CHOOSE <god-name>" message type.
87+
* Method choose validates a "CHOOSE &lt;god-name&gt;" message type.
8888
*
8989
* @param in of type String[] - the user input under array representation.
9090
* @return ChallengerPhaseAction - the correct ChallengerPhaseAction, null otherwise.
@@ -102,7 +102,7 @@ public ChallengerPhaseAction choose(String[] in) {
102102
}
103103

104104
/**
105-
* Method starter validates a "STARTER <player-number>" message type.
105+
* Method starter validates a "STARTER &lt;player-number&gt;" message type.
106106
*
107107
* @param in of type String[] - the user input under array representation.
108108
* @return ChallengerPhaseAction - the correct ChallengerPhaseAction, null otherwise.
@@ -120,7 +120,7 @@ public ChallengerPhaseAction starter(String[] in) {
120120
}
121121

122122
/**
123-
* Method set validates a "SET <x1> <y1> <x2> <y2>" worker placement message type.
123+
* Method set validates a "SET &lt;x1&gt; &lt;y1&gt; &lt;x2&gt; &lt;y2&gt;" worker placement message type.
124124
*
125125
* @param in of type String[] - the user input under array representation.
126126
* @return ChallengerPhaseAction - the correct ChallengerPhaseAction, null otherwise.

src/main/java/it/polimi/ingsw/client/ModelView.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void setGodDesc(String godDesc) {
7575
*
7676
*
7777
*
78-
* @param playerMapColor the playerMapColor (type Map<String, String>) of this ModelView object.
78+
* @param playerMapColor the playerMapColor (type Maps&lt;String, String&gt;) of this ModelView object.
7979
*
8080
*/
8181
public void setPlayerMapColor(Map<String, String> playerMapColor) {
@@ -87,7 +87,7 @@ public void setPlayerMapColor(Map<String, String> playerMapColor) {
8787
*
8888
*
8989
*
90-
* @param playerMapGod the playerMapColor (type Map<String, String>) of this ModelView object.
90+
* @param playerMapGod the playerMapColor (type Maps&lt;String, String&gt;) of this ModelView object.
9191
*
9292
*/
9393
public void setPlayerMapGod(Map<String, String> playerMapGod) {
@@ -99,7 +99,7 @@ public void setPlayerMapGod(Map<String, String> playerMapGod) {
9999
*
100100
*
101101
*
102-
* @return the playerMapColor (type Map<String, String>) of this ModelView object.
102+
* @return the playerMapColor (type Maps&lt;String, String&gt;) of this ModelView object.
103103
*/
104104
public Map<String, String> getPlayerMapColor() {
105105
return playerMapColor;
@@ -110,7 +110,7 @@ public Map<String, String> getPlayerMapColor() {
110110
*
111111
*
112112
*
113-
* @return the playerMapGod (type Map<String, String>) of this ModelView object.
113+
* @return the playerMapGod (type Maps&lt;String, String&gt;) of this ModelView object.
114114
*/
115115
public Map<String, String> getPlayerMapGod() {
116116
return playerMapGod;
@@ -121,7 +121,7 @@ public Map<String, String> getPlayerMapGod() {
121121
*
122122
*
123123
*
124-
* @return the selectSpaces (type List<Couple>) of this ModelView object.
124+
* @return the selectSpaces (type List&lt;Couple&gt;) of this ModelView object.
125125
*/
126126
public List<Couple> getSelectSpaces() {
127127
return selectSpaces;
@@ -132,7 +132,7 @@ public List<Couple> getSelectSpaces() {
132132
*
133133
*
134134
*
135-
* @param selectSpaces the selectSpaces(type List<Couple>) of this ModelView object.
135+
* @param selectSpaces the selectSpaces(type List&lt;Couple&gt;) of this ModelView object.
136136
*
137137
*/
138138
public void setSelectSpaces(List<Couple> selectSpaces) {

src/main/java/it/polimi/ingsw/client/cli/CLI.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ private String[] generateRows(int level, String[] levels) {
274274
* @param color of type String - the worker's color.
275275
* @param rows of type String[] - the rows used to insert player.
276276
* @param level of type int - the level modified.
277+
* @param type of type int - the type of worker.
277278
*/
278279
private void addWorkerToCell(String color, String[] rows, int level, int type) {
279280
String[] temp = new String[3];
@@ -338,7 +339,7 @@ private int getRightIndex(boolean b, int i2, int i3) {
338339
*
339340
* @param temp of type String[] - temporary cell's rows in which player is inserted.
340341
* @param player of type String[] - the player to be inserted into the rows.
341-
* @return HashMap<Integer, String [ ]> - the two strings.
342+
*@return HashMaps&lt;Integer, String[]&gt; - the two strings.
342343
*/
343344
private HashMap<Integer, String[]> createStringMap(String[] temp, String[] player) {
344345
HashMap<Integer, String[]> stringMap = new HashMap<>();
@@ -353,7 +354,7 @@ private HashMap<Integer, String[]> createStringMap(String[] temp, String[] playe
353354
* @param color of type String - the player's color
354355
* @param rows of type String[] - the cell's row
355356
* @param cellInfos of type int[] - the grid's levels
356-
* @param stringMap of type HashMap<Integer, String[]> - the hashmap mapping levels to correct strings.
357+
* @param stringMap of type HashMap&lt;Integer, String[]&gt; - the hashmap mapping levels to correct strings.
357358
* @param indexes of type int[][] - the indexes for each level.
358359
* @param backgroundColor of type String - the worker's background color.
359360
* @param counters of type int[] - the indexes in order to print correctly.
@@ -544,6 +545,7 @@ private String[] buildSideHelp() {
544545
* Method addScores adds spaces to side menu.
545546
*
546547
* @param max of type int - max length of side menu.
548+
* @param s of type String - the String provided.
547549
* @return StringBuilder - the string added to side menu.
548550
*/
549551
private StringBuilder addSpaces(int max, String s) {
@@ -605,7 +607,7 @@ public void choosePlayerNumber() {
605607
* Method chooseColor lets the player decide his color, relying on the available ones.
606608
* If the player is the last in a three-players match, the server automatically assign him the last color.
607609
*
608-
* @param available of type List<PlayerColors> - the list of available colors, which will be printed out.
610+
* @param available of type List&lt;PlayerColors&gt; - the list of available colors, which will be printed out.
609611
*/
610612
public void chooseColor(List<PlayerColors> available) {
611613
firstBuildBoard(grid);
@@ -628,7 +630,7 @@ public void chooseColor(List<PlayerColors> available) {
628630
}
629631

630632
/**
631-
* Method greaterThan prints ">".
633+
* Method greaterThan prints "&gt;".
632634
*/
633635
private void greaterThan() {
634636
System.out.print(">");

src/main/java/it/polimi/ingsw/client/gui/controllers/GodsPanelController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public void showGod(ActionEvent event) {
3535

3636
/**
3737
* Method chooseInit initializes the god panel for user's choosing action. It creates the buttons "Choose" and
38-
* "Close" and prepares the command "CHOOSE <god-name>" to be sent to the server.
38+
* "Close" and prepares the command "CHOOSE &lt;god-name&gt;" to be sent to the server.
3939
*
40-
* @param cards of type List<Card> - the deck of cards.
40+
* @param cards of type List&lt;Card&gt; - the deck of cards.
4141
*/
4242
public void chooseInit(List<Card> cards) {
4343
for(int i=0; i<3; i++){

src/main/java/it/polimi/ingsw/client/gui/controllers/LoaderController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public boolean godTile(Card god, boolean isChoosing) {
7979

8080
/**
8181
* Method workerPlacement lists all workers' available positions and make him choose the preferred one.
82-
* @param coords of type List<int[]> - the available coordinates.
82+
* @param coords of type List&lt;int[]&gt; - the available coordinates.
8383
*/
8484
public void workerPlacement(List<int[]> coords) {
8585
gui.getModelView().activateInput();
@@ -241,7 +241,7 @@ public void requestPlayerNumber(String message){
241241
/**
242242
* Method requestColor lets each user choose his workers' color, however, in a match of 3 players the last one
243243
* receives the remaining color.
244-
* @param colors of type List<PlayerColors> - the available colors.
244+
* @param colors of type List&lt;PlayerColors&gt; - the available colors.
245245
*/
246246
public void requestColor(List<PlayerColors> colors) {
247247
Alert alert = new Alert(Alert.AlertType.CONFIRMATION);

src/main/java/it/polimi/ingsw/client/gui/controllers/MainGuiController.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ public void selectWorker() {
210210
* @param row of type int - the row of the cell.
211211
* @param col of type int - the column of the cell.
212212
* @param dome of type boolean - true if user wants to build a dome, false otherwise.
213+
* @param action of type Action - the type of action.
213214
*/
214215
public void build(int row, int col, boolean dome, Action action) {
215216
if (!action.equals(Action.BUILD)) {
@@ -484,12 +485,17 @@ public void setGui(GUI gui) {
484485
/**
485486
* Method getColors returns the colors of this MainGuiController object.
486487
*
487-
* @return the colors (type HashMap<String, Color>) of this MainGuiController object.
488+
* @return the colors (type HashMap&lt;String, Color&gt;) of this MainGuiController object.
488489
*/
489490
public Map<String, Color> getColors() {
490491
return colors;
491492
}
492493

494+
/**
495+
* Method workerPlacement displays worker placement.
496+
*
497+
* @param coords of type List&lt;int[]&gt; - the coords received.
498+
*/
493499
public void workerPlacement(List<int[]> coords) {
494500
gui.getModelView().activateInput();
495501
String[] set =new String[2];

src/main/java/it/polimi/ingsw/constants/Constants.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private Constants() {}
7676
*
7777
*
7878
*
79-
* @return the godMapCustomAction (type HashMap<String, String>) of this Constants object.
79+
* @return the godMapCustomAction (type HashMaps&lt;String, String&gt;) of this Constants object.
8080
*/
8181
public static Map<String, String> getGodMapCustomAction() {
8282
return godMapCustomAction;
@@ -88,7 +88,7 @@ public static Map<String, String> getGodMapCustomAction() {
8888
*
8989
*
9090
*
91-
* @return the specialBuildGods (type List<String>) of this Constants object.
91+
* @return the specialBuildGods (type List&lt;String&gt;) of this Constants object.
9292
*/
9393
public static List<String> getSpecialBuildGods() {
9494
return SPECIAL_BUILD_GODS;
@@ -101,7 +101,7 @@ public static List<String> getSpecialBuildGods() {
101101
*
102102
*
103103
*
104-
* @return the endActionGods (type List<String>) of this Constants object.
104+
* @return the endActionGods (type List&lt;String&gt;) of this Constants object.
105105
*/
106106
public static List<String> getEndActionGods() {
107107
return END_ACTION_GODS;
@@ -115,7 +115,7 @@ public static List<String> getEndActionGods() {
115115
*
116116
*
117117
*
118-
* @return the startActionGods (type List<String>) of this Constants object.
118+
* @return the startActionGods (type List&lt;String&gt;) of this Constants object.
119119
*/
120120
public static List<String> getStartActionGods() {
121121
return START_ACTION_GODS;
@@ -128,7 +128,7 @@ public static List<String> getStartActionGods() {
128128
*
129129
*
130130
*
131-
* @return the buildSameBlockGods (type List<String>) of this Constants object.
131+
* @return the buildSameBlockGods (type List&lt;String&gt;) of this Constants object.
132132
*/
133133
public static List<String> getBuildSameBlockGods() {
134134
return BUILD_SAME_BLOCK_GODS;
@@ -141,7 +141,7 @@ public static List<String> getBuildSameBlockGods() {
141141
*
142142
*
143143
*
144-
* @return the doubleMoveGods (type List<String>) of this Constants object.
144+
* @return the doubleMoveGods (type List&lt;String&gt;) of this Constants object.
145145
*/
146146
public static List<String> getDoubleMoveGods() {
147147
return DOUBLE_MOVE_GODS;
@@ -154,7 +154,7 @@ public static List<String> getDoubleMoveGods() {
154154
*
155155
*
156156
*
157-
* @return the alternatePhaseGods (type List<String>) of this Constants object.
157+
* @return the alternatePhaseGods (type List&lt;String&gt;) of this Constants object.
158158
*/
159159
public static List<String> getAlternatePhaseGods() { return ALTERNATE_PHASE_GODS; }
160160

@@ -165,7 +165,7 @@ public static List<String> getDoubleMoveGods() {
165165
*
166166
*
167167
*
168-
* @return the doubleBuildGods (type List<String>) of this Constants object.
168+
* @return the doubleBuildGods (type List&lt;String&gt;) of this Constants object.
169169
*/
170170
public static List<String> getDoubleBuildGods() {
171171
return DOUBLE_BUILD_GODS;
@@ -181,7 +181,7 @@ public static List<String> getDoubleBuildGods() {
181181
*
182182
*
183183
*
184-
* @return the movePhaseGods (type List<String>) of this Constants object.
184+
* @return the movePhaseGods (type List&lt;String&gt;) of this Constants object.
185185
*/
186186
public static List<String> getMovePhaseGods() {
187187
return MOVE_PHASE_GODS;
@@ -196,7 +196,7 @@ public static List<String> getMovePhaseGods() {
196196
*
197197
*
198198
*
199-
* @return the buildPhaseGods (type List<String>) of this Constants object.
199+
* @return the buildPhaseGods (type List&lt;String&gt;) of this Constants object.
200200
*/
201201
public static List<String> getBuildPhaseGods() {
202202
return BUILD_PHASE_GODS;
@@ -212,7 +212,7 @@ public static List<String> getBuildPhaseGods() {
212212
*
213213
*
214214
*
215-
* @return the moveToCellOccupiedGods (type List<String>) of this Constants object.
215+
* @return the moveToCellOccupiedGods (type List&lt;String&gt;) of this Constants object.
216216
*/
217217
public static List<String> getMoveToCellOccupiedGods() {
218218
return MOVE_TO_CELL_OCCUPIED_GODS;

0 commit comments

Comments
 (0)