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
    Constructor
    Description
    Result(int mekTechsGenerated, int mechanicsGenerated, int aeroTeksGenerated, int baTechsGenerated, int doctorsGenerated, int administratorsGenerated, int astechsAdded, int medicsAdded, List<Person> generatedPersons)
    Creates an instance of a Result record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the administratorsGenerated record component.
    int
    Returns the value of the aeroTeksGenerated record component.
    int
    Returns the value of the astechsAdded record component.
    int
    Returns the value of the baTechsGenerated record component.
    int
    Returns the value of the doctorsGenerated record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the generatedPersons record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the mechanicsGenerated record component.
    int
    Returns the value of the medicsAdded record component.
    int
    Returns the value of the mekTechsGenerated record component.
    final String
    Returns a string representation of this record class.
    int
    Sum of the four tech-role generated counts.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a Result record class.
      Parameters:
      mekTechsGenerated - the value for the mekTechsGenerated record component
      mechanicsGenerated - the value for the mechanicsGenerated record component
      aeroTeksGenerated - the value for the aeroTeksGenerated record component
      baTechsGenerated - the value for the baTechsGenerated record component
      doctorsGenerated - the value for the doctorsGenerated record component
      administratorsGenerated - the value for the administratorsGenerated record component
      astechsAdded - the value for the astechsAdded record component
      medicsAdded - the value for the medicsAdded record component
      generatedPersons - the value for the generatedPersons record component
  • Method Details

    • totalTechsGenerated

      public int totalTechsGenerated()
      Sum of the four tech-role generated counts.
    • 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.
    • mekTechsGenerated

      public int mekTechsGenerated()
      Returns the value of the mekTechsGenerated record component.
      Returns:
      the value of the mekTechsGenerated record component
    • mechanicsGenerated

      public int mechanicsGenerated()
      Returns the value of the mechanicsGenerated record component.
      Returns:
      the value of the mechanicsGenerated record component
    • aeroTeksGenerated

      public int aeroTeksGenerated()
      Returns the value of the aeroTeksGenerated record component.
      Returns:
      the value of the aeroTeksGenerated record component
    • baTechsGenerated

      public int baTechsGenerated()
      Returns the value of the baTechsGenerated record component.
      Returns:
      the value of the baTechsGenerated record component
    • doctorsGenerated

      public int doctorsGenerated()
      Returns the value of the doctorsGenerated record component.
      Returns:
      the value of the doctorsGenerated record component
    • administratorsGenerated

      public int administratorsGenerated()
      Returns the value of the administratorsGenerated record component.
      Returns:
      the value of the administratorsGenerated record component
    • astechsAdded

      public int astechsAdded()
      Returns the value of the astechsAdded record component.
      Returns:
      the value of the astechsAdded record component
    • medicsAdded

      public int medicsAdded()
      Returns the value of the medicsAdded record component.
      Returns:
      the value of the medicsAdded record component
    • generatedPersons

      public List<Person> generatedPersons()
      Returns the value of the generatedPersons record component.
      Returns:
      the value of the generatedPersons record component