Record Class MilitaryCampaignAnalyzer.SupplyRequirements

java.lang.Object
java.lang.Record
org.episteme.social.history.MilitaryCampaignAnalyzer.SupplyRequirements
Record Components:
foodKgPerDay - total food weight needed daily
waterLitersPerDay - total water volume needed daily
fodderKgPerDay - total animal feed weight needed daily
ammunitionKg - total ammunition weight for operation
fuelLitersPerDay - total fuel volume for cooking/machines
All Implemented Interfaces:
Serializable
Enclosing class:
MilitaryCampaignAnalyzer

public static record MilitaryCampaignAnalyzer.SupplyRequirements(double foodKgPerDay, double waterLitersPerDay, double fodderKgPerDay, double ammunitionKg, double fuelLitersPerDay) extends Record implements Serializable
Quantified daily needs for a specific army.
See Also:
  • Constructor Details

    • SupplyRequirements

      public SupplyRequirements(double foodKgPerDay, double waterLitersPerDay, double fodderKgPerDay, double ammunitionKg, double fuelLitersPerDay)
      Creates an instance of a SupplyRequirements record class.
      Parameters:
      foodKgPerDay - the value for the foodKgPerDay record component
      waterLitersPerDay - the value for the waterLitersPerDay record component
      fodderKgPerDay - the value for the fodderKgPerDay record component
      ammunitionKg - the value for the ammunitionKg record component
      fuelLitersPerDay - the value for the fuelLitersPerDay 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 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.
    • foodKgPerDay

      public double foodKgPerDay()
      Returns the value of the foodKgPerDay record component.
      Returns:
      the value of the foodKgPerDay record component
    • waterLitersPerDay

      public double waterLitersPerDay()
      Returns the value of the waterLitersPerDay record component.
      Returns:
      the value of the waterLitersPerDay record component
    • fodderKgPerDay

      public double fodderKgPerDay()
      Returns the value of the fodderKgPerDay record component.
      Returns:
      the value of the fodderKgPerDay record component
    • ammunitionKg

      public double ammunitionKg()
      Returns the value of the ammunitionKg record component.
      Returns:
      the value of the ammunitionKg record component
    • fuelLitersPerDay

      public double fuelLitersPerDay()
      Returns the value of the fuelLitersPerDay record component.
      Returns:
      the value of the fuelLitersPerDay record component