Record Class MilitaryCampaignAnalyzer.CampaignAnalysis
java.lang.Object
java.lang.Record
org.episteme.social.history.MilitaryCampaignAnalyzer.CampaignAnalysis
- Record Components:
totalDistanceKm- total path lengthdaysRequired- estimated duration in daystotalSuppliesNeeded- sum of requirements per categoryattritionRate- estimated percentage of force lost (0.0 to 1.0)criticalPoints- list of identified logistical hazardslogisticallyFeasible- 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 Summary
ConstructorsConstructorDescriptionCampaignAnalysis(double totalDistanceKm, int daysRequired, Map<MilitaryCampaignAnalyzer.SupplyType, Double> totalSuppliesNeeded, double attritionRate, List<String> criticalPoints, boolean logisticallyFeasible) Creates an instance of aCampaignAnalysisrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theattritionRaterecord component.Returns the value of thecriticalPointsrecord component.intReturns the value of thedaysRequiredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thelogisticallyFeasiblerecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalDistanceKmrecord component.Returns the value of thetotalSuppliesNeededrecord component.
-
Constructor Details
-
CampaignAnalysis
public CampaignAnalysis(double totalDistanceKm, int daysRequired, Map<MilitaryCampaignAnalyzer.SupplyType, Double> totalSuppliesNeeded, double attritionRate, List<String> criticalPoints, boolean logisticallyFeasible) Creates an instance of aCampaignAnalysisrecord class.- Parameters:
totalDistanceKm- the value for thetotalDistanceKmrecord componentdaysRequired- the value for thedaysRequiredrecord componenttotalSuppliesNeeded- the value for thetotalSuppliesNeededrecord componentattritionRate- the value for theattritionRaterecord componentcriticalPoints- the value for thecriticalPointsrecord componentlogisticallyFeasible- the value for thelogisticallyFeasiblerecord component
-
-
Method Details
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
totalDistanceKm
public double totalDistanceKm()Returns the value of thetotalDistanceKmrecord component.- Returns:
- the value of the
totalDistanceKmrecord component
-
daysRequired
public int daysRequired()Returns the value of thedaysRequiredrecord component.- Returns:
- the value of the
daysRequiredrecord component
-
totalSuppliesNeeded
Returns the value of thetotalSuppliesNeededrecord component.- Returns:
- the value of the
totalSuppliesNeededrecord component
-
attritionRate
public double attritionRate()Returns the value of theattritionRaterecord component.- Returns:
- the value of the
attritionRaterecord component
-
criticalPoints
Returns the value of thecriticalPointsrecord component.- Returns:
- the value of the
criticalPointsrecord component
-
logisticallyFeasible
public boolean logisticallyFeasible()Returns the value of thelogisticallyFeasiblerecord component.- Returns:
- the value of the
logisticallyFeasiblerecord component
-