Skip to content

Commit 44e2aa4

Browse files
committed
add docstrings
1 parent e874757 commit 44e2aa4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

MekHQ/src/mekhq/campaign/universe/HiringHallOverride.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525

2626
import java.time.LocalDate;
2727

28+
/**
29+
* Class representing an "override" for the dynamic hiring hall system. Normally, hiring halls are
30+
* generated dynamically based on planetary system factors like tech level and HPG quality, but some
31+
* canonical systems should have hiring halls of certain qualities despite what the dynamic formula
32+
* says.
33+
* Overrides are stored as child elements of planetary systems in systems.xml, with a start date,
34+
* optional end date, and quality.
35+
*/
2836
@XmlRootElement(name = "hiringHall")
2937
@XmlAccessorType(value = XmlAccessType.FIELD)
3038
public class HiringHallOverride {
@@ -35,14 +43,31 @@ public class HiringHallOverride {
3543
@XmlElement
3644
private HiringHallLevel level = HiringHallLevel.NONE;
3745

46+
/**
47+
* Gets the level of the hiring hall for this override
48+
*
49+
* @return The hiring hall level as an enum
50+
*/
3851
public HiringHallLevel getLevel() {
3952
return level;
4053
}
4154

55+
/**
56+
* Sets the hiring hall level for this override
57+
*
58+
* @param level The level of hiring hall
59+
*/
4260
public void setLevel(HiringHallLevel level) {
4361
this.level = level;
4462
}
4563

64+
/**
65+
* Checks whether the hiring hall is active on a certain date. Returns true if no end date is
66+
* specified in the override.
67+
*
68+
* @param date The date to check whether the hiring hall is active
69+
* @return boolean representing whether the hiring hall is active
70+
*/
4671
public boolean isActive(LocalDate date) {
4772
// Hall has no start date, so it's always inactive
4873
if (start == null) {

0 commit comments

Comments
 (0)