Record Class EpochData

java.lang.Object
java.lang.Record
epidemic.statistics.EpochData
Record Components:
epochNumber - Numer zarchiwizowanej epoki (kroku czasowego) symulacji.
healthyCount - Liczba agentów w pełni zdrowych (potencjalnie podatnych na infekcję).
sickCount - Liczba aktywnych i pełnoobjawowych nosicieli patogenu.
recoveredCount - Liczba agentów, którzy pomyślnie zwalczyli infekcję.
naturalDeadCount - Skumulowana liczba zgonów wynikających z uwarunkowań biologicznych (np. wiek).
virusDeadCount - Skumulowana liczba ofiar śmiertelnych wywołanych powikłaniami infekcji.
totalPopulation - Aktualna liczba całkowita żywych osobników na mapie.

public record EpochData(int epochNumber, int healthyCount, int sickCount, int recoveredCount, int naturalDeadCount, int virusDeadCount, int totalPopulation) extends Record
Niemutowalna struktura danych (wzorzec Data Transfer Object - DTO) reprezentująca telemetryczną migawkę stanu symulacji dla konkretnej epoki czasowej. Zapewnia bezpieczne (wątkowo i architektonicznie) przekazywanie zagregowanych danych pomiędzy silnikiem symulacji a modułami analitycznymi i statystycznymi.
  • Field Details

    • epochNumber

      private final int epochNumber
      The field for the epochNumber record component.
    • healthyCount

      private final int healthyCount
      The field for the healthyCount record component.
    • sickCount

      private final int sickCount
      The field for the sickCount record component.
    • recoveredCount

      private final int recoveredCount
      The field for the recoveredCount record component.
    • naturalDeadCount

      private final int naturalDeadCount
      The field for the naturalDeadCount record component.
    • virusDeadCount

      private final int virusDeadCount
      The field for the virusDeadCount record component.
    • totalPopulation

      private final int totalPopulation
      The field for the totalPopulation record component.
  • Constructor Details

    • EpochData

      public EpochData(int epochNumber, int healthyCount, int sickCount, int recoveredCount, int naturalDeadCount, int virusDeadCount, int totalPopulation)
      Creates an instance of a EpochData record class.
      Parameters:
      epochNumber - the value for the epochNumber record component
      healthyCount - the value for the healthyCount record component
      sickCount - the value for the sickCount record component
      recoveredCount - the value for the recoveredCount record component
      naturalDeadCount - the value for the naturalDeadCount record component
      virusDeadCount - the value for the virusDeadCount record component
      totalPopulation - the value for the totalPopulation 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.
    • epochNumber

      public int epochNumber()
      Returns the value of the epochNumber record component.
      Returns:
      the value of the epochNumber record component
    • healthyCount

      public int healthyCount()
      Returns the value of the healthyCount record component.
      Returns:
      the value of the healthyCount record component
    • sickCount

      public int sickCount()
      Returns the value of the sickCount record component.
      Returns:
      the value of the sickCount record component
    • recoveredCount

      public int recoveredCount()
      Returns the value of the recoveredCount record component.
      Returns:
      the value of the recoveredCount record component
    • naturalDeadCount

      public int naturalDeadCount()
      Returns the value of the naturalDeadCount record component.
      Returns:
      the value of the naturalDeadCount record component
    • virusDeadCount

      public int virusDeadCount()
      Returns the value of the virusDeadCount record component.
      Returns:
      the value of the virusDeadCount record component
    • totalPopulation

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