Record Class RecoveringNerveAction
java.lang.Object
java.lang.Record
megamek.common.autoResolve.acar.action.RecoveringNerveAction
- All Implemented Interfaces:
- EntityAction,- Action
- 
Constructor SummaryConstructorsConstructorDescriptionRecoveringNerveAction(int formationId) Creates an instance of aRecoveringNerveActionrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of theformationIdrecord component.intgetHandler(SimulationManager gameManager) final inthashCode()Returns a hash code value for this object.booleanisDataValid(SimulationContext context) Validates the data of this action.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.actions.EntityActiontoAccessibilityDescription, toSummaryString
- 
Constructor Details- 
RecoveringNerveActionpublic RecoveringNerveAction(int formationId) Creates an instance of aRecoveringNerveActionrecord class.- Parameters:
- formationId- the value for the- formationIdrecord component
 
 
- 
- 
Method Details- 
getEntityIdpublic int getEntityId()- Specified by:
- getEntityIdin interface- EntityAction
- Returns:
- The ID of the acting game unit. Note that when an entity is destroyed, it may no longer be available from
       Game.getEntity(int)but rather only fromGame.getOutOfGameEntity(int)orGame.getEntityFromAllSources(int). As this can happen in the middle of resolving complicated situations in the GameManager, this is a potential cause for bugs.
 Note that this is not restricted toEntity; it can be used for allInGameObjects that are handled in the game.
 
- 
getHandler- Specified by:
- getHandlerin interface- Action
- Returns:
- A handler that will process this action as an extension of the SBFGameManager
 
- 
isDataValidDescription copied from interface:ActionValidates the data of this action. Validation should not check game rule details, only if the action can be handled without running into missing or false data (NullPointerExceptions). Errors should be logged. The action will typically be ignored and removed if validation fails.- Specified by:
- isDataValidin interface- Action
- Parameters:
- context- The simulation context
- Returns:
- true when this action is valid, false otherwise
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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. All components in this record class are compared with '=='.
- 
formationIdpublic int formationId()Returns the value of theformationIdrecord component.- Returns:
- the value of the formationIdrecord component
 
 
-