Package megamek.common.analysis
Record Class DamageProfile.ArcSummary
java.lang.Object
java.lang.Record
megamek.common.analysis.DamageProfile.ArcSummary
- Record Components:
maximumAverage- mean of the maximum-damage curve over the direction's reachshortRangeAverage- mean expected damage over ranges 1-7mediumRangeAverage- mean expected damage over ranges 8-14longRangeAverage- mean expected damage over ranges 15 to the direction's reachreach- longest range any bearing weapon covers in this direction
- Enclosing class:
DamageProfile
public static record DamageProfile.ArcSummary(double maximumAverage, double shortRangeAverage, double mediumRangeAverage, double longRangeAverage, int reach)
extends Record
Per-direction firepower summary for one of the six hex-side directions relative to the
unit's facing (0 = front, counting clockwise: 1 = front-right, 2 = rear-right, 3 = rear,
4 = rear-left, 5 = front-left). Only weapons whose firing arc covers the direction
contribute; torso twist and turret rotation are not applied - arcs are as mounted.
-
Constructor Summary
ConstructorsConstructorDescriptionArcSummary(double maximumAverage, double shortRangeAverage, double mediumRangeAverage, double longRangeAverage, int reach) Creates an instance of aArcSummaryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thelongRangeAveragerecord component.doubleReturns the value of themaximumAveragerecord component.doubleReturns the value of themediumRangeAveragerecord component.intreach()Returns the value of thereachrecord component.doubleReturns the value of theshortRangeAveragerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArcSummary
public ArcSummary(double maximumAverage, double shortRangeAverage, double mediumRangeAverage, double longRangeAverage, int reach) Creates an instance of aArcSummaryrecord class.- Parameters:
maximumAverage- the value for themaximumAveragerecord componentshortRangeAverage- the value for theshortRangeAveragerecord componentmediumRangeAverage- the value for themediumRangeAveragerecord componentlongRangeAverage- the value for thelongRangeAveragerecord componentreach- the value for thereachrecord 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. All components in this record class are compared with '=='. -
maximumAverage
public double maximumAverage()Returns the value of themaximumAveragerecord component.- Returns:
- the value of the
maximumAveragerecord component
-
shortRangeAverage
public double shortRangeAverage()Returns the value of theshortRangeAveragerecord component.- Returns:
- the value of the
shortRangeAveragerecord component
-
mediumRangeAverage
public double mediumRangeAverage()Returns the value of themediumRangeAveragerecord component.- Returns:
- the value of the
mediumRangeAveragerecord component
-
longRangeAverage
public double longRangeAverage()Returns the value of thelongRangeAveragerecord component.- Returns:
- the value of the
longRangeAveragerecord component
-
reach
public int reach()Returns the value of thereachrecord component.- Returns:
- the value of the
reachrecord component
-