Skip to content

Commit 432430e

Browse files
committed
Finish documentation for the remaining classes
1 parent 67bc4d4 commit 432430e

File tree

7 files changed

+155
-188
lines changed

7 files changed

+155
-188
lines changed

src/main/java/bwapi/Race.java

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,27 +63,24 @@ public enum Race {
6363
}
6464

6565
/**
66-
* Retrieves the default worker type for this Race.
66+
* Retrieves the default worker type for this {@link Race}.
6767
*
68-
* @note In Starcraft, workers are the units that are used to construct structures.
68+
* In Starcraft, workers are the units that are used to construct structures.
6969
*
70-
* @return UnitType of the worker that this race uses.
70+
* @return {@link UnitType} of the worker that this race uses.
7171
*/
7272
public UnitType getWorker() {
7373
return workerTypes[id];
7474
}
7575

76-
// DATA
77-
78-
//@since 4.2.0
7976
/**
80-
* Retrieves the default resource depot UnitType that workers of this race can
77+
* Retrieves the default resource depot {@link UnitType} that workers of this race can
8178
* construct and return resources to.
8279
*
83-
* @note In Starcraft, the center is the very first structure of the Race's technology
80+
* In Starcraft, the center is the very first structure of the Race's technology
8481
* tree. Also known as its base of operations or resource depot.
8582
*
86-
* @return UnitType of the center that this race uses.
83+
* @return {@link UnitType} of the center that this race uses.
8784
*
8885
* @since 4.2.0
8986
*/
@@ -102,39 +99,38 @@ public UnitType getCenter() {
10299
}
103100

104101
/**
105-
* Retrieves the default structure UnitType for this Race that is used to harvest gas from
106-
* @Geysers.
102+
* Retrieves the default structure UnitType for this Race that is used to harvest gas from @Geysers.
107103
*
108-
* @note In Starcraft, you must first construct a structure over a @Geyser in order to
104+
* In Starcraft, you must first construct a structure over a @Geyser in order to
109105
* begin harvesting Vespene Gas.
110106
*
111-
* @return UnitType of the structure used to harvest gas.
107+
* @return {@link UnitType} of the structure used to harvest gas.
112108
*/
113109
public UnitType getRefinery() {
114110
return refineryTypes[id];
115111
}
116112

117113
/**
118-
* Retrieves the default transport UnitType for this race that is used to transport ground
114+
* Retrieves the default transport {@link UnitType} for this race that is used to transport ground
119115
* units across the map.
120116
*
121-
* @note In Starcraft, transports will allow you to carry ground units over unpassable
117+
* In Starcraft, transports will allow you to carry ground units over unpassable
122118
* terrain.
123119
*
124-
* @return UnitType for transportation.
120+
* @return {@link UnitType} for transportation.
125121
*/
126122
public UnitType getTransport() {
127123
return transportTypes[id];
128124
}
129125

130126
/**
131-
* Retrieves the default supply provider UnitType for this race that is used to construct
127+
* Retrieves the default supply provider {@link UnitType} for this race that is used to construct
132128
* units.
133129
*
134-
* @note In Starcraft, training, morphing, or warping in units requires that the player
130+
* In Starcraft, training, morphing, or warping in units requires that the player
135131
* has sufficient supply available for their Race.
136132
*
137-
* @return UnitType that provides the player with supply.
133+
* @return {@link UnitType} that provides the player with supply.
138134
*/
139135
public UnitType getSupplyProvider() {
140136
return supplyTypes[id];

src/main/java/bwapi/Region.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* Most parameters that are available are explicitly assigned by Broodwar itself.
1515
*
16-
* @see Game#getAllRegions, Game#getRegionAt, Unit#getRegion
16+
* @see {@link Game#getAllRegions}, {@link Game#getRegionAt}, {@link Unit#getRegion}
1717
*/
1818
public class Region implements Comparable<Region> {
1919
private final RegionData regionData;
@@ -74,10 +74,10 @@ void updateNeighbours() {
7474
/**
7575
* Retrieves a unique identifier for this region.
7676
*
77-
* @note This identifier is explicitly assigned by Broodwar.
77+
* This identifier is explicitly assigned by Broodwar.
7878
*
7979
* @return An integer that represents this region.
80-
* @see Game#getRegion
80+
* @see {@link Game#getRegion}
8181
*/
8282
public int getID() {
8383
return id;
@@ -89,7 +89,7 @@ public int getID() {
8989
* group ID. This function is generally used to check if a path is available between two
9090
* points in constant time.
9191
*
92-
* @note This identifier is explicitly assigned by Broodwar.
92+
* This identifier is explicitly assigned by Broodwar.
9393
*
9494
* @return An integer that represents the group of regions that this one is attached to.
9595
*/
@@ -101,7 +101,7 @@ public int getRegionGroupID() {
101101
* Retrieves the center of the region. This position is used as the node
102102
* of the region.
103103
*
104-
* @return A Position indicating the center location of the Region, in pixels.
104+
* @return A {@link Position} indicating the center location of the Region, in pixels.
105105
*/
106106
public Position getCenter() {
107107
return center;
@@ -122,7 +122,7 @@ public boolean isHigherGround() {
122122
* to other regions. A value of 2 may indicate a possible choke point, and a value
123123
* of 3 indicates a signficant strategic position.
124124
*
125-
* @note This value is explicitly assigned by Broodwar.
125+
* This value is explicitly assigned by Broodwar.
126126
*
127127
* @return An integer indicating this region's strategic potential.
128128
*/
@@ -189,7 +189,7 @@ public int getBoundsBottom() {
189189
/**
190190
* Retrieves the closest accessible neighbor region.
191191
*
192-
* @return The closest Region that is accessible.
192+
* @return The closest {@link Region} that is accessible.
193193
*/
194194
public Region getClosestAccessibleRegion() {
195195
return closestAccessibleRegion;
@@ -198,7 +198,7 @@ public Region getClosestAccessibleRegion() {
198198
/**
199199
* Retrieves the closest inaccessible neighbor region.
200200
*
201-
* @return The closest Region that is inaccessible.
201+
* @return The closest {@link Region} that is inaccessible.
202202
*/
203203
public Region getClosestInaccessibleRegion() {
204204
return closestInaccessibleRegion;
@@ -207,9 +207,9 @@ public Region getClosestInaccessibleRegion() {
207207
/**
208208
* Retrieves the center-to-center distance between two regions.
209209
*
210-
* @note Ignores all collisions.
210+
* Ignores all collisions.
211211
*
212-
* @param other The target Region to calculate distance to.
212+
* @param other The target {@link Region} to calculate distance to.
213213
* @return The integer distance from this Region to \p other.
214214
*/
215215
public int getDistance(final Region other) {
@@ -229,7 +229,7 @@ public List<Unit> getUnits() {
229229
* @return A List<Unit> containing all units in this region that have met the requirements
230230
* of \p pred.
231231
*
232-
* @see UnitFilter
232+
* @see {@link UnitFilter}
233233
*/
234234
public List<Unit> getUnits(final UnitFilter pred) {
235235
return game.getUnitsInRectangle(getBoundsLeft(), getBoundsTop(), getBoundsRight(), getBoundsBottom(),

src/main/java/bwapi/TechType.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ public enum TechType {
198198
}
199199

200200
/**
201-
* Retrieves the race that is required to research or use the TechType.
201+
* Retrieves the race that is required to research or use the {@link TechType}.
202202
*
203-
* @note There is an exception where @Infested_Kerrigan can use @Psi_Storm. This does not
203+
* There is an exception where @Infested_Kerrigan can use @Psi_Storm. This does not
204204
* apply to the behavior of this function.
205205
*
206-
* @return Race object indicating which race is designed to use this technology type.
206+
* @return {@link Race} object indicating which race is designed to use this technology type.
207207
*/
208208
public Race getRace() {
209209
return techRaces[id];
@@ -231,27 +231,27 @@ public int gasPrice() {
231231
* Retrieves the number of frames needed to research the tech type.
232232
*
233233
* @return The time, in frames, it will take for the research to complete.
234-
* @see Unit#getRemainingResearchTime
234+
* @see {@link Unit#getRemainingResearchTime}
235235
*/
236236
public int researchTime() {
237237
return defaultTimeCost[id];
238238
}
239239

240240
/**
241-
* Retrieves the amount of energy needed to use this TechType as an ability.
241+
* Retrieves the amount of energy needed to use this {@link TechType} as an ability.
242242
*
243243
* @return Energy cost of the ability.
244-
* @see Unit#getEnergy
244+
* @see {@link Unit#getEnergy}
245245
*/
246246
public int energyCost() {
247247
return defaultEnergyCost[id];
248248
}
249249

250250
/**
251-
* Retrieves the UnitType that can research this technology.
251+
* Retrieves the {@link UnitType} that can research this technology.
252252
*
253253
* @return UnitType that is able to research the technology in the game.
254-
* @retval UnitType.None If the technology/ability is either provided for free or never
254+
* Returns {@link UnitType#None} If the technology/ability is either provided for free or never
255255
* available.
256256
*/
257257
public UnitType whatResearches() {
@@ -260,11 +260,11 @@ public UnitType whatResearches() {
260260

261261
/**
262262
* Retrieves the Weapon that is attached to this tech type.
263-
* A technology's WeaponType is used to indicate the range and behaviour of the ability
263+
* A technology's {@link WeaponType} is used to indicate the range and behaviour of the ability
264264
* when used by a Unit.
265265
*
266266
* @return WeaponType containing information about the ability's behavior.
267-
* @retval WeaponType.None If there is no corresponding WeaponType.
267+
* Returns {@link WeaponType#None} If there is no corresponding WeaponType.
268268
*/
269269
public WeaponType getWeapon() {
270270
return techWeapons[id];
@@ -298,23 +298,23 @@ public List<UnitType> whatUses() {
298298
}
299299

300300
/**
301-
* Retrieves the Order that a Unit uses when using this ability.
301+
* Retrieves the {@link Order} that a Unit uses when using this ability.
302302
*
303-
* @return Order representing the action a Unit uses to perform this ability
303+
* @return {@link Order} representing the action a Unit uses to perform this ability
304304
*/
305305
public Order getOrder() {
306306
return techOrders[id];
307307
}
308308

309309
/**
310-
* Retrieves the UnitType required to research this technology.
310+
* Retrieves the {@link UnitType} required to research this technology.
311311
* The required unit type must be a completed unit owned by the player researching the
312312
* technology.
313313
*
314-
* @return UnitType that is needed to research this tech type.
315-
* @retval UnitType.None if no unit is required to research this tech type.
314+
* @return {@link UnitType} that is needed to research this tech type.
315+
* Returns {@link UnitType#None} if no unit is required to research this tech type.
316316
*
317-
* @see Player#completedUnitCount
317+
* @see {@link Player#completedUnitCount}
318318
*
319319
* @since 4.1.2
320320
*/

src/main/java/bwapi/Unit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6096,7 +6096,7 @@ public boolean canPlaceCOP(TilePosition target) {
60966096
/**
60976097
* Cheap checks for whether the unit is able to execute a placeCOP command.
60986098
*
6099-
* @see {@lin Unit#canIssueCommand}, {@link Unit#placeCOP}
6099+
* @see {@link Unit#canIssueCommand}, {@link Unit#placeCOP}
61006100
*/
61016101
public boolean canPlaceCOP(TilePosition target, boolean checkCanIssueCommandType, boolean checkCommandibility) {
61026102
if (checkCommandibility && !canCommand()) {

0 commit comments

Comments
 (0)