Record Class EmployerData
java.lang.Object
java.lang.Record
mekhq.campaign.mission.contract.contractData.EmployerData
- Record Components:
factionCode- the employer's flavor faction — who is paying the unit and whose theme matches theChaosEmployerType. Used for display, negotiator/liaison, and camouflage. May be a landless faction (rebels, a mercenary command, a corporation).anchorFactionCode- the employer's territorial anchor faction — a faction that actually holds ground near the player, used to situate the enemy and target system. Equal tofactionCodewhen the flavor faction is itself a nearby territorial owner.sponsorFactionCode- the covert patron bankrolling the employer, ornullwhen the employer acts on its own account. Currently only rebels can be sponsored, by a ComStar/Word of Blake patron backing their uprising — the mirror of an enemy fielding sponsored mercenaries.
public record EmployerData(ChaosEmployerType type, String factionCode, String anchorFactionCode, @Nullable String sponsorFactionCode, String displayName, Person negotiator, Person liaison, megamek.common.enums.SkillLevel forceSkill, int equipmentRating, megamek.common.icons.Camouflage camouflage, megamek.client.ui.util.PlayerColour color)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionEmployerData(EmployerData existingData, megamek.common.enums.SkillLevel forceSkill, int equipmentRating) EmployerData(ChaosEmployerType type, String factionCode, String anchorFactionCode, String sponsorFactionCode, String displayName, Person negotiator, Person liaison, megamek.common.enums.SkillLevel forceSkill, int equipmentRating, megamek.common.icons.Camouflage camouflage, megamek.client.ui.util.PlayerColour color) Creates an instance of aEmployerDatarecord class.EmployerData(ChaosEmployerType type, String factionCode, String anchorFactionCode, String sponsorFactionCode, String displayName, Person negotiator, Person liaison, megamek.common.icons.Camouflage camouflage) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanchorFactionCoderecord component.megamek.common.icons.CamouflageReturns the value of thecamouflagerecord component.megamek.client.ui.util.PlayerColourcolor()Returns the value of thecolorrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theequipmentRatingrecord component.Returns the value of thefactionCoderecord component.megamek.common.enums.SkillLevelReturns the value of theforceSkillrecord component.final inthashCode()Returns a hash code value for this object.liaison()Returns the value of theliaisonrecord component.Returns the value of thenegotiatorrecord component.Returns the value of thesponsorFactionCoderecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
EmployerData
-
EmployerData
public EmployerData(EmployerData existingData, megamek.common.enums.SkillLevel forceSkill, int equipmentRating) -
EmployerData
public EmployerData(ChaosEmployerType type, String factionCode, String anchorFactionCode, @Nullable String sponsorFactionCode, String displayName, Person negotiator, Person liaison, megamek.common.enums.SkillLevel forceSkill, int equipmentRating, megamek.common.icons.Camouflage camouflage, megamek.client.ui.util.PlayerColour color) Creates an instance of aEmployerDatarecord class.- Parameters:
type- the value for thetyperecord componentfactionCode- the value for thefactionCoderecord componentanchorFactionCode- the value for theanchorFactionCoderecord componentsponsorFactionCode- the value for thesponsorFactionCoderecord componentdisplayName- the value for thedisplayNamerecord componentnegotiator- the value for thenegotiatorrecord componentliaison- the value for theliaisonrecord componentforceSkill- the value for theforceSkillrecord componentequipmentRating- the value for theequipmentRatingrecord componentcamouflage- the value for thecamouflagerecord componentcolor- the value for thecolorrecord component
-
-
Method Details
-
getFaction
- Returns:
- the flavor faction — who is paying the unit (see
factionCode())
-
getAnchorFaction
- Returns:
- the territorial anchor faction used to situate the enemy and target system (see
anchorFactionCode())
-
getSponsorFaction
- Returns:
- the covert patron bankrolling the employer, or
nullif the employer has none (seesponsorFactionCode())
-
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
factionCode
Returns the value of thefactionCoderecord component.- Returns:
- the value of the
factionCoderecord component
-
anchorFactionCode
Returns the value of theanchorFactionCoderecord component.- Returns:
- the value of the
anchorFactionCoderecord component
-
sponsorFactionCode
Returns the value of thesponsorFactionCoderecord component.- Returns:
- the value of the
sponsorFactionCoderecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
negotiator
Returns the value of thenegotiatorrecord component.- Returns:
- the value of the
negotiatorrecord component
-
liaison
Returns the value of theliaisonrecord component.- Returns:
- the value of the
liaisonrecord component
-
forceSkill
public megamek.common.enums.SkillLevel forceSkill()Returns the value of theforceSkillrecord component.- Returns:
- the value of the
forceSkillrecord component
-
equipmentRating
public int equipmentRating()Returns the value of theequipmentRatingrecord component.- Returns:
- the value of the
equipmentRatingrecord component
-
camouflage
public megamek.common.icons.Camouflage camouflage()Returns the value of thecamouflagerecord component.- Returns:
- the value of the
camouflagerecord component
-
color
public megamek.client.ui.util.PlayerColour color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-