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 Details

    • SalvageFormationData

      public SalvageFormationData(Formation formation, FormationType formationType, @Nullable Person tech, double maximumCargoCapacity, double maximumTowCapacity, int salvageCapableUnits, boolean hasTug)
      Creates an instance of a SalvageFormationData record class.
      Parameters:
      formation - the value for the formation record component
      formationType - the value for the formationType record component
      tech - the value for the tech record component
      maximumCargoCapacity - the value for the maximumCargoCapacity record component
      maximumTowCapacity - the value for the maximumTowCapacity record component
      salvageCapableUnits - the value for the salvageCapableUnits record component
      hasTug - the value for the hasTug record component
  • Method Details

    • buildData

      public static SalvageFormationData buildData(Campaign campaign, Formation formation, boolean isSpaceScenario)
    • getTechTooltip

      public String getTechTooltip(Campaign campaign, Person tech)
    • getAllCrewTechTooltip

      public String getAllCrewTechTooltip(Campaign campaign, Formation formation)
    • getCargoCapacityTooltip

      public String getCargoCapacityTooltip(Hangar hangar)
    • getTowCapacityTooltip

      public String getTowCapacityTooltip(Hangar hangar)
    • getTugTooltip

      public String getTugTooltip(Hangar hangar)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • formation

      public Formation formation()
      Returns the value of the formation record component.
      Returns:
      the value of the formation record component
    • formationType

      public FormationType formationType()
      Returns the value of the formationType record component.
      Returns:
      the value of the formationType record component
    • tech

      @Nullable public Person tech()
      Returns the value of the tech record component.
      Returns:
      the value of the tech record component
    • maximumCargoCapacity

      public double maximumCargoCapacity()
      Returns the value of the maximumCargoCapacity record component.
      Returns:
      the value of the maximumCargoCapacity record component
    • maximumTowCapacity

      public double maximumTowCapacity()
      Returns the value of the maximumTowCapacity record component.
      Returns:
      the value of the maximumTowCapacity record component
    • salvageCapableUnits

      public int salvageCapableUnits()
      Returns the value of the salvageCapableUnits record component.
      Returns:
      the value of the salvageCapableUnits record component
    • hasTug

      public boolean hasTug()
      Returns the value of the hasTug record component.
      Returns:
      the value of the hasTug record component