Record Class SalvageFormationData
java.lang.Object
java.lang.Record
mekhq.campaign.mission.camOpsSalvage.SalvageFormationData
public record SalvageFormationData(Formation formation, FormationType formationType, Person tech, double maximumCargoCapacity, double maximumTowCapacity, int salvageCapableUnits, boolean hasTug)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSalvageFormationData(Formation formation, FormationType formationType, Person tech, double maximumCargoCapacity, double maximumTowCapacity, int salvageCapableUnits, boolean hasTug) Creates an instance of aSalvageFormationDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SalvageFormationDatafinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theformationrecord component.Returns the value of theformationTyperecord component.getAllCrewTechTooltip(Campaign campaign, Formation formation) getCargoCapacityTooltip(Hangar hangar) getTechTooltip(Campaign campaign, Person tech) getTowCapacityTooltip(Hangar hangar) getTugTooltip(Hangar hangar) final inthashCode()Returns a hash code value for this object.booleanhasTug()Returns the value of thehasTugrecord component.doubleReturns the value of themaximumCargoCapacityrecord component.doubleReturns the value of themaximumTowCapacityrecord component.intReturns the value of thesalvageCapableUnitsrecord component.tech()Returns the value of thetechrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SalvageFormationData
public SalvageFormationData(Formation formation, FormationType formationType, @Nullable Person tech, double maximumCargoCapacity, double maximumTowCapacity, int salvageCapableUnits, boolean hasTug) Creates an instance of aSalvageFormationDatarecord class.- Parameters:
formation- the value for theformationrecord componentformationType- the value for theformationTyperecord componenttech- the value for thetechrecord componentmaximumCargoCapacity- the value for themaximumCargoCapacityrecord componentmaximumTowCapacity- the value for themaximumTowCapacityrecord componentsalvageCapableUnits- the value for thesalvageCapableUnitsrecord componenthasTug- the value for thehasTugrecord component
-
-
Method Details
-
buildData
public static SalvageFormationData buildData(Campaign campaign, Formation formation, boolean isSpaceScenario) -
getTechTooltip
-
getAllCrewTechTooltip
-
getCargoCapacityTooltip
-
getTowCapacityTooltip
-
getTugTooltip
-
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 '=='. -
formation
Returns the value of theformationrecord component.- Returns:
- the value of the
formationrecord component
-
formationType
Returns the value of theformationTyperecord component.- Returns:
- the value of the
formationTyperecord component
-
tech
Returns the value of thetechrecord component.- Returns:
- the value of the
techrecord component
-
maximumCargoCapacity
public double maximumCargoCapacity()Returns the value of themaximumCargoCapacityrecord component.- Returns:
- the value of the
maximumCargoCapacityrecord component
-
maximumTowCapacity
public double maximumTowCapacity()Returns the value of themaximumTowCapacityrecord component.- Returns:
- the value of the
maximumTowCapacityrecord component
-
salvageCapableUnits
public int salvageCapableUnits()Returns the value of thesalvageCapableUnitsrecord component.- Returns:
- the value of the
salvageCapableUnitsrecord component
-
hasTug
public boolean hasTug()Returns the value of thehasTugrecord component.- Returns:
- the value of the
hasTugrecord component
-