Record Class HiringCostBreakdown
java.lang.Object
java.lang.Record
mekhq.campaign.market.personnelMarket.records.HiringCostBreakdown
- Record Components:
salaryCost- the salary-based hiring cost; zero if the applicant is priced by their training, or if the campaign does not pay for recruitmenttrainingCost- the training-based hiring cost, ornullif the applicant is priced by their salary or the campaign does not pay for recruitmentgoldenHelloExtra- the extra cost of a Golden Hello, zero if none is offered
public record HiringCostBreakdown(Money salaryCost, @Nullable RecruitmentCosts.TrainingCostBreakdown trainingCost, Money goldenHelloExtra)
extends Record
The cost of hiring an applicant from the personnel market, split by part.
- Since:
- 0.51.01
-
Constructor Summary
ConstructorsConstructorDescriptionHiringCostBreakdown(Money salaryCost, RecruitmentCosts.TrainingCostBreakdown trainingCost, Money goldenHelloExtra) Creates an instance of aHiringCostBreakdownrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegoldenHelloExtrarecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thesalaryCostrecord component.final StringtoString()Returns a string representation of this record class.total()Returns the value of thetrainingCostrecord component.
-
Constructor Details
-
HiringCostBreakdown
public HiringCostBreakdown(Money salaryCost, @Nullable RecruitmentCosts.TrainingCostBreakdown trainingCost, Money goldenHelloExtra) Creates an instance of aHiringCostBreakdownrecord class.- Parameters:
salaryCost- the value for thesalaryCostrecord componenttrainingCost- the value for thetrainingCostrecord componentgoldenHelloExtra- the value for thegoldenHelloExtrarecord component
-
-
Method Details
-
total
- Returns:
- the combined cost of every part
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
salaryCost
Returns the value of thesalaryCostrecord component.- Returns:
- the value of the
salaryCostrecord component
-
trainingCost
Returns the value of thetrainingCostrecord component.- Returns:
- the value of the
trainingCostrecord component
-
goldenHelloExtra
Returns the value of thegoldenHelloExtrarecord component.- Returns:
- the value of the
goldenHelloExtrarecord component
-