Record Class SupportPersonnelGenerator.Result
java.lang.Object
java.lang.Record
mekhq.campaign.universe.commandGeneration.ratgen.SupportPersonnelGenerator.Result
- Enclosing class:
SupportPersonnelGenerator
public static record SupportPersonnelGenerator.Result(int mekTechsGenerated, int mechanicsGenerated, int aeroTeksGenerated, int baTechsGenerated, int doctorsGenerated, int administratorsGenerated, int astechsAdded, int medicsAdded, List<Person> generatedPersons)
extends Record
Counts emitted by the generator, useful for logging and reporting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theadministratorsGeneratedrecord component.intReturns the value of theaeroTeksGeneratedrecord component.intReturns the value of theastechsAddedrecord component.intReturns the value of thebaTechsGeneratedrecord component.intReturns the value of thedoctorsGeneratedrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegeneratedPersonsrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themechanicsGeneratedrecord component.intReturns the value of themedicsAddedrecord component.intReturns the value of themekTechsGeneratedrecord component.final StringtoString()Returns a string representation of this record class.intSum of the four tech-role generated counts.
-
Constructor Details
-
Result
public Result(int mekTechsGenerated, int mechanicsGenerated, int aeroTeksGenerated, int baTechsGenerated, int doctorsGenerated, int administratorsGenerated, int astechsAdded, int medicsAdded, List<Person> generatedPersons) Creates an instance of aResultrecord class.- Parameters:
mekTechsGenerated- the value for themekTechsGeneratedrecord componentmechanicsGenerated- the value for themechanicsGeneratedrecord componentaeroTeksGenerated- the value for theaeroTeksGeneratedrecord componentbaTechsGenerated- the value for thebaTechsGeneratedrecord componentdoctorsGenerated- the value for thedoctorsGeneratedrecord componentadministratorsGenerated- the value for theadministratorsGeneratedrecord componentastechsAdded- the value for theastechsAddedrecord componentmedicsAdded- the value for themedicsAddedrecord componentgeneratedPersons- the value for thegeneratedPersonsrecord component
-
-
Method Details
-
totalTechsGenerated
public int totalTechsGenerated()Sum of the four tech-role generated counts. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
mekTechsGenerated
public int mekTechsGenerated()Returns the value of themekTechsGeneratedrecord component.- Returns:
- the value of the
mekTechsGeneratedrecord component
-
mechanicsGenerated
public int mechanicsGenerated()Returns the value of themechanicsGeneratedrecord component.- Returns:
- the value of the
mechanicsGeneratedrecord component
-
aeroTeksGenerated
public int aeroTeksGenerated()Returns the value of theaeroTeksGeneratedrecord component.- Returns:
- the value of the
aeroTeksGeneratedrecord component
-
baTechsGenerated
public int baTechsGenerated()Returns the value of thebaTechsGeneratedrecord component.- Returns:
- the value of the
baTechsGeneratedrecord component
-
doctorsGenerated
public int doctorsGenerated()Returns the value of thedoctorsGeneratedrecord component.- Returns:
- the value of the
doctorsGeneratedrecord component
-
administratorsGenerated
public int administratorsGenerated()Returns the value of theadministratorsGeneratedrecord component.- Returns:
- the value of the
administratorsGeneratedrecord component
-
astechsAdded
public int astechsAdded()Returns the value of theastechsAddedrecord component.- Returns:
- the value of the
astechsAddedrecord component
-
medicsAdded
public int medicsAdded()Returns the value of themedicsAddedrecord component.- Returns:
- the value of the
medicsAddedrecord component
-
generatedPersons
Returns the value of thegeneratedPersonsrecord component.- Returns:
- the value of the
generatedPersonsrecord component
-