Package megamek.server.trigger
Record Class SpecificRoundEndTrigger
java.lang.Object
java.lang.Record
megamek.server.trigger.SpecificRoundEndTrigger
- All Implemented Interfaces:
- Trigger
This Trigger reacts at the end of the specified game round. This is more or less the same as a RoundStartTrigger of
 the following round, but this can be used to trigger something without actually entering the following round just yet
 (e.g. ending the game at the end of round 10 instead of at the beginning of round 11). Note that this Trigger can
 react multiple times!
- 
Constructor SummaryConstructorsConstructorDescriptionSpecificRoundEndTrigger(int gameRound) Creates an instance of aSpecificRoundEndTriggerrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegameRoundrecord component.final inthashCode()Returns a hash code value for this object.booleanisTriggered(IGame game, TriggerSituation event) Returns true when this Trigger is triggered, i.e.toString()Returns a string representation of this record class.
- 
Constructor Details- 
SpecificRoundEndTriggerpublic SpecificRoundEndTrigger(int gameRound) Creates an instance of aSpecificRoundEndTriggerrecord class.- Parameters:
- gameRound- the value for the- gameRoundrecord component
 
 
- 
- 
Method Details- 
isTriggeredDescription copied from interface:TriggerReturns true when this Trigger is triggered, i.e. if the prerequisites for its associated event are deemed to be satisfied. Note that the event is itself responsible for making sure that it only returns true once, if it should only trigger once. If it returns true on multiple occasions, the triggered event may happen multiple times. The given TriggerEvent specifies when at what moment of the game this method is called.- Specified by:
- isTriggeredin interface- Trigger
- Parameters:
- game- The game
- event- The type of event that caused the trigger to be called
- Returns:
- True when this Trigger considers itself triggered, 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 '=='.
- 
gameRoundpublic int gameRound()Returns the value of thegameRoundrecord component.- Returns:
- the value of the gameRoundrecord component
 
 
-