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 reach
shortRangeAverage - mean expected damage over ranges 1-7
mediumRangeAverage - mean expected damage over ranges 8-14
longRangeAverage - mean expected damage over ranges 15 to the direction's reach
reach - 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 Details

    • ArcSummary

      public ArcSummary(double maximumAverage, double shortRangeAverage, double mediumRangeAverage, double longRangeAverage, int reach)
      Creates an instance of a ArcSummary record class.
      Parameters:
      maximumAverage - the value for the maximumAverage record component
      shortRangeAverage - the value for the shortRangeAverage record component
      mediumRangeAverage - the value for the mediumRangeAverage record component
      longRangeAverage - the value for the longRangeAverage record component
      reach - the value for the reach record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • maximumAverage

      public double maximumAverage()
      Returns the value of the maximumAverage record component.
      Returns:
      the value of the maximumAverage record component
    • shortRangeAverage

      public double shortRangeAverage()
      Returns the value of the shortRangeAverage record component.
      Returns:
      the value of the shortRangeAverage record component
    • mediumRangeAverage

      public double mediumRangeAverage()
      Returns the value of the mediumRangeAverage record component.
      Returns:
      the value of the mediumRangeAverage record component
    • longRangeAverage

      public double longRangeAverage()
      Returns the value of the longRangeAverage record component.
      Returns:
      the value of the longRangeAverage record component
    • reach

      public int reach()
      Returns the value of the reach record component.
      Returns:
      the value of the reach record component