Record Class RecordingCompositeTechLevel.ComponentTechRecord

java.lang.Object
java.lang.Record
megamek.common.RecordingCompositeTechLevel.ComponentTechRecord
Record Components:
componentName - The name the component was reported under
prototypeDate - The component's own prototype date, or ITechnology.DATE_NONE
productionDate - The component's own production date, or ITechnology.DATE_NONE
commonDate - The component's own common date, or ITechnology.DATE_NONE
staticTechLevel - The component's tech level when variable tech level is off
variableTechLevel - The component's tech level in the evaluated year, or null when the component has no advancement dates and therefore no era progression
extinctionDate - The component's own extinction date, or ITechnology.DATE_NONE
reintroductionDate - The component's own reintroduction date, or ITechnology.DATE_NONE
compositePrototypeDate - The unit's prototype date after this component was added
compositeProductionDate - The unit's production date after this component was added
compositeCommonDate - The unit's common date after this component was added
compositeExtinctionDate - The unit's extinction date after this component was added
compositeReintroductionDate - The unit's reintroduction date after this component was added
Enclosing class:
RecordingCompositeTechLevel

public static record RecordingCompositeTechLevel.ComponentTechRecord(String componentName, int prototypeDate, int productionDate, int commonDate, SimpleTechLevel staticTechLevel, @Nullable SimpleTechLevel variableTechLevel, int extinctionDate, int reintroductionDate, int compositePrototypeDate, int compositeProductionDate, int compositeCommonDate, int compositeExtinctionDate, int compositeReintroductionDate) extends Record
A single component of a unit, as recorded while the composite tech level was being built.
  • Constructor Details

    • ComponentTechRecord

      public ComponentTechRecord(String componentName, int prototypeDate, int productionDate, int commonDate, SimpleTechLevel staticTechLevel, @Nullable SimpleTechLevel variableTechLevel, int extinctionDate, int reintroductionDate, int compositePrototypeDate, int compositeProductionDate, int compositeCommonDate, int compositeExtinctionDate, int compositeReintroductionDate)
      Creates an instance of a ComponentTechRecord record class.
      Parameters:
      componentName - the value for the componentName record component
      prototypeDate - the value for the prototypeDate record component
      productionDate - the value for the productionDate record component
      commonDate - the value for the commonDate record component
      staticTechLevel - the value for the staticTechLevel record component
      variableTechLevel - the value for the variableTechLevel record component
      extinctionDate - the value for the extinctionDate record component
      reintroductionDate - the value for the reintroductionDate record component
      compositePrototypeDate - the value for the compositePrototypeDate record component
      compositeProductionDate - the value for the compositeProductionDate record component
      compositeCommonDate - the value for the compositeCommonDate record component
      compositeExtinctionDate - the value for the compositeExtinctionDate record component
      compositeReintroductionDate - the value for the compositeReintroductionDate record component
  • Method Details

    • 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.
    • componentName

      public String componentName()
      Returns the value of the componentName record component.
      Returns:
      the value of the componentName record component
    • prototypeDate

      public int prototypeDate()
      Returns the value of the prototypeDate record component.
      Returns:
      the value of the prototypeDate record component
    • productionDate

      public int productionDate()
      Returns the value of the productionDate record component.
      Returns:
      the value of the productionDate record component
    • commonDate

      public int commonDate()
      Returns the value of the commonDate record component.
      Returns:
      the value of the commonDate record component
    • staticTechLevel

      public SimpleTechLevel staticTechLevel()
      Returns the value of the staticTechLevel record component.
      Returns:
      the value of the staticTechLevel record component
    • variableTechLevel

      @Nullable public SimpleTechLevel variableTechLevel()
      Returns the value of the variableTechLevel record component.
      Returns:
      the value of the variableTechLevel record component
    • extinctionDate

      public int extinctionDate()
      Returns the value of the extinctionDate record component.
      Returns:
      the value of the extinctionDate record component
    • reintroductionDate

      public int reintroductionDate()
      Returns the value of the reintroductionDate record component.
      Returns:
      the value of the reintroductionDate record component
    • compositePrototypeDate

      public int compositePrototypeDate()
      Returns the value of the compositePrototypeDate record component.
      Returns:
      the value of the compositePrototypeDate record component
    • compositeProductionDate

      public int compositeProductionDate()
      Returns the value of the compositeProductionDate record component.
      Returns:
      the value of the compositeProductionDate record component
    • compositeCommonDate

      public int compositeCommonDate()
      Returns the value of the compositeCommonDate record component.
      Returns:
      the value of the compositeCommonDate record component
    • compositeExtinctionDate

      public int compositeExtinctionDate()
      Returns the value of the compositeExtinctionDate record component.
      Returns:
      the value of the compositeExtinctionDate record component
    • compositeReintroductionDate

      public int compositeReintroductionDate()
      Returns the value of the compositeReintroductionDate record component.
      Returns:
      the value of the compositeReintroductionDate record component