Record Class GroundMovementAdjacency
java.lang.Object
java.lang.Record
megamek.common.strategicBattleSystems.GroundMovementAdjacency
- All Implemented Interfaces:
AdjacencyMap<SBFMovePath>
public record GroundMovementAdjacency(SBFGame game)
extends Record
implements AdjacencyMap<SBFMovePath>
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aGroundMovementAdjacencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.game()Returns the value of thegamerecord component.Produces set of MovePaths by extending MovePath mp with MoveSteps.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GroundMovementAdjacency
Creates an instance of aGroundMovementAdjacencyrecord class.- Parameters:
game- the value for thegamerecord component
-
-
Method Details
-
getAdjacent
Produces set of MovePaths by extending MovePath mp with MoveSteps. The set of extending steps include {F, L, R, UP, ShL, ShR} if applicable. If stepType is equal to MoveStepType.BACKWARDS then extending steps include also {B, ShBL, ShBR}. If stepType is equal to MoveStep.DFA or MoveStep.CHARGE then it is added to the resulting set.- Specified by:
getAdjacentin interfaceAdjacencyMap<SBFMovePath>- Parameters:
mp- the MovePath to be extended- Returns:
- all the edges that lead from destination node of e
- See Also:
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
game
Returns the value of thegamerecord component.- Returns:
- the value of the
gamerecord component
-