Package megamek.common
Record Class RecordingCompositeTechLevel.ComponentTechRecord
java.lang.Object
java.lang.Record
megamek.common.RecordingCompositeTechLevel.ComponentTechRecord
- Record Components:
componentName- The name the component was reported underprototypeDate- The component's own prototype date, orITechnology.DATE_NONEproductionDate- The component's own production date, orITechnology.DATE_NONEcommonDate- The component's own common date, orITechnology.DATE_NONEstaticTechLevel- The component's tech level when variable tech level is offvariableTechLevel- The component's tech level in the evaluated year, ornullwhen the component has no advancement dates and therefore no era progressionextinctionDate- The component's own extinction date, orITechnology.DATE_NONEreintroductionDate- The component's own reintroduction date, orITechnology.DATE_NONEcompositePrototypeDate- The unit's prototype date after this component was addedcompositeProductionDate- The unit's production date after this component was addedcompositeCommonDate- The unit's common date after this component was addedcompositeExtinctionDate- The unit's extinction date after this component was addedcompositeReintroductionDate- 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 Summary
ConstructorsConstructorDescriptionComponentTechRecord(String componentName, int prototypeDate, int productionDate, int commonDate, SimpleTechLevel staticTechLevel, SimpleTechLevel variableTechLevel, int extinctionDate, int reintroductionDate, int compositePrototypeDate, int compositeProductionDate, int compositeCommonDate, int compositeExtinctionDate, int compositeReintroductionDate) Creates an instance of aComponentTechRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecommonDaterecord component.Returns the value of thecomponentNamerecord component.intReturns the value of thecompositeCommonDaterecord component.intReturns the value of thecompositeExtinctionDaterecord component.intReturns the value of thecompositeProductionDaterecord component.intReturns the value of thecompositePrototypeDaterecord component.intReturns the value of thecompositeReintroductionDaterecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theextinctionDaterecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theproductionDaterecord component.intReturns the value of theprototypeDaterecord component.intReturns the value of thereintroductionDaterecord component.Returns the value of thestaticTechLevelrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevariableTechLevelrecord component.
-
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 aComponentTechRecordrecord class.- Parameters:
componentName- the value for thecomponentNamerecord componentprototypeDate- the value for theprototypeDaterecord componentproductionDate- the value for theproductionDaterecord componentcommonDate- the value for thecommonDaterecord componentstaticTechLevel- the value for thestaticTechLevelrecord componentvariableTechLevel- the value for thevariableTechLevelrecord componentextinctionDate- the value for theextinctionDaterecord componentreintroductionDate- the value for thereintroductionDaterecord componentcompositePrototypeDate- the value for thecompositePrototypeDaterecord componentcompositeProductionDate- the value for thecompositeProductionDaterecord componentcompositeCommonDate- the value for thecompositeCommonDaterecord componentcompositeExtinctionDate- the value for thecompositeExtinctionDaterecord componentcompositeReintroductionDate- the value for thecompositeReintroductionDaterecord component
-
-
Method Details
-
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 '=='. -
componentName
Returns the value of thecomponentNamerecord component.- Returns:
- the value of the
componentNamerecord component
-
prototypeDate
public int prototypeDate()Returns the value of theprototypeDaterecord component.- Returns:
- the value of the
prototypeDaterecord component
-
productionDate
public int productionDate()Returns the value of theproductionDaterecord component.- Returns:
- the value of the
productionDaterecord component
-
commonDate
public int commonDate()Returns the value of thecommonDaterecord component.- Returns:
- the value of the
commonDaterecord component
-
staticTechLevel
Returns the value of thestaticTechLevelrecord component.- Returns:
- the value of the
staticTechLevelrecord component
-
variableTechLevel
Returns the value of thevariableTechLevelrecord component.- Returns:
- the value of the
variableTechLevelrecord component
-
extinctionDate
public int extinctionDate()Returns the value of theextinctionDaterecord component.- Returns:
- the value of the
extinctionDaterecord component
-
reintroductionDate
public int reintroductionDate()Returns the value of thereintroductionDaterecord component.- Returns:
- the value of the
reintroductionDaterecord component
-
compositePrototypeDate
public int compositePrototypeDate()Returns the value of thecompositePrototypeDaterecord component.- Returns:
- the value of the
compositePrototypeDaterecord component
-
compositeProductionDate
public int compositeProductionDate()Returns the value of thecompositeProductionDaterecord component.- Returns:
- the value of the
compositeProductionDaterecord component
-
compositeCommonDate
public int compositeCommonDate()Returns the value of thecompositeCommonDaterecord component.- Returns:
- the value of the
compositeCommonDaterecord component
-
compositeExtinctionDate
public int compositeExtinctionDate()Returns the value of thecompositeExtinctionDaterecord component.- Returns:
- the value of the
compositeExtinctionDaterecord component
-
compositeReintroductionDate
public int compositeReintroductionDate()Returns the value of thecompositeReintroductionDaterecord component.- Returns:
- the value of the
compositeReintroductionDaterecord component
-