Record Class MilitaryCampaignAnalyzer.CampaignAnalysis

java.lang.Object
java.lang.Record
org.episteme.social.history.MilitaryCampaignAnalyzer.CampaignAnalysis
Record Components:
totalDistanceKm - total path length
daysRequired - estimated duration in days
totalSuppliesNeeded - sum of requirements per category
attritionRate - estimated percentage of force lost (0.0 to 1.0)
criticalPoints - list of identified logistical hazards
logisticallyFeasible - true if the army can sustain itself along the route
All Implemented Interfaces:
Serializable
Enclosing class:
MilitaryCampaignAnalyzer

public static record MilitaryCampaignAnalyzer.CampaignAnalysis(double totalDistanceKm, int daysRequired, Map<MilitaryCampaignAnalyzer.SupplyType, Double> totalSuppliesNeeded, double attritionRate, List<String> criticalPoints, boolean logisticallyFeasible) extends Record implements Serializable
Final report of campaign feasibility and requirements.
See Also:
  • Constructor Details

  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • totalDistanceKm

      public double totalDistanceKm()
      Returns the value of the totalDistanceKm record component.
      Returns:
      the value of the totalDistanceKm record component
    • daysRequired

      public int daysRequired()
      Returns the value of the daysRequired record component.
      Returns:
      the value of the daysRequired record component
    • totalSuppliesNeeded

      public Map<MilitaryCampaignAnalyzer.SupplyType, Double> totalSuppliesNeeded()
      Returns the value of the totalSuppliesNeeded record component.
      Returns:
      the value of the totalSuppliesNeeded record component
    • attritionRate

      public double attritionRate()
      Returns the value of the attritionRate record component.
      Returns:
      the value of the attritionRate record component
    • criticalPoints

      public List<String> criticalPoints()
      Returns the value of the criticalPoints record component.
      Returns:
      the value of the criticalPoints record component
    • logisticallyFeasible

      public boolean logisticallyFeasible()
      Returns the value of the logisticallyFeasible record component.
      Returns:
      the value of the logisticallyFeasible record component