Package epidemic.statistics
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theepochNumberrecord component.private final intThe field for thehealthyCountrecord component.private final intThe field for thenaturalDeadCountrecord component.private final intThe field for therecoveredCountrecord component.private final intThe field for thesickCountrecord component.private final intThe field for thetotalPopulationrecord component.private final intThe field for thevirusDeadCountrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionEpochData(int epochNumber, int healthyCount, int sickCount, int recoveredCount, int naturalDeadCount, int virusDeadCount, int totalPopulation) Creates an instance of aEpochDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theepochNumberrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thehealthyCountrecord component.intReturns the value of thenaturalDeadCountrecord component.intReturns the value of therecoveredCountrecord component.intReturns the value of thesickCountrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalPopulationrecord component.intReturns the value of thevirusDeadCountrecord component.
-
Field Details
-
epochNumber
private final int epochNumberThe field for theepochNumberrecord component. -
healthyCount
private final int healthyCountThe field for thehealthyCountrecord component. -
sickCount
private final int sickCountThe field for thesickCountrecord component. -
recoveredCount
private final int recoveredCountThe field for therecoveredCountrecord component. -
naturalDeadCount
private final int naturalDeadCountThe field for thenaturalDeadCountrecord component. -
virusDeadCount
private final int virusDeadCountThe field for thevirusDeadCountrecord component. -
totalPopulation
private final int totalPopulationThe field for thetotalPopulationrecord component.
-
-
Constructor Details
-
EpochData
public EpochData(int epochNumber, int healthyCount, int sickCount, int recoveredCount, int naturalDeadCount, int virusDeadCount, int totalPopulation) Creates an instance of aEpochDatarecord class.- Parameters:
epochNumber- the value for theepochNumberrecord componenthealthyCount- the value for thehealthyCountrecord componentsickCount- the value for thesickCountrecord componentrecoveredCount- the value for therecoveredCountrecord componentnaturalDeadCount- the value for thenaturalDeadCountrecord componentvirusDeadCount- the value for thevirusDeadCountrecord componenttotalPopulation- the value for thetotalPopulationrecord component
-
-
Method Details
-
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. -
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. -
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. All components in this record class are compared with '=='. -
epochNumber
public int epochNumber()Returns the value of theepochNumberrecord component.- Returns:
- the value of the
epochNumberrecord component
-
healthyCount
public int healthyCount()Returns the value of thehealthyCountrecord component.- Returns:
- the value of the
healthyCountrecord component
-
sickCount
public int sickCount()Returns the value of thesickCountrecord component.- Returns:
- the value of the
sickCountrecord component
-
recoveredCount
public int recoveredCount()Returns the value of therecoveredCountrecord component.- Returns:
- the value of the
recoveredCountrecord component
-
naturalDeadCount
public int naturalDeadCount()Returns the value of thenaturalDeadCountrecord component.- Returns:
- the value of the
naturalDeadCountrecord component
-
virusDeadCount
public int virusDeadCount()Returns the value of thevirusDeadCountrecord component.- Returns:
- the value of the
virusDeadCountrecord component
-
totalPopulation
public int totalPopulation()Returns the value of thetotalPopulationrecord component.- Returns:
- the value of the
totalPopulationrecord component
-