Record Class HistoricalDemography.DemographicSnapshot
java.lang.Object
java.lang.Record
org.episteme.social.history.HistoricalDemography.DemographicSnapshot
- Record Components:
date- point in time (possibly fuzzy)population- estimated population countgrowthRate- annual growth rate (as a decimal, e.g., 0.01 for 1%)region- geographical region identifierreliability- data reliability score (0.0 to 1.0)
- All Implemented Interfaces:
Serializable
- Enclosing class:
HistoricalDemography
public static record HistoricalDemography.DemographicSnapshot(TimeCoordinate date, long population, double growthRate, String region, double reliability)
extends Record
implements Serializable
Data record representing population status at a point in time.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDemographicSnapshot(TimeCoordinate date, long population, double growthRate, String region, double reliability) Creates an instance of aDemographicSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondate()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thegrowthRaterecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of thepopulationrecord component.region()Returns the value of theregionrecord component.doubleReturns the value of thereliabilityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DemographicSnapshot
public DemographicSnapshot(TimeCoordinate date, long population, double growthRate, String region, double reliability) Creates an instance of aDemographicSnapshotrecord class.- Parameters:
date- the value for thedaterecord componentpopulation- the value for thepopulationrecord componentgrowthRate- the value for thegrowthRaterecord componentregion- the value for theregionrecord componentreliability- the value for thereliabilityrecord 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. -
date
-
population
public long population()Returns the value of thepopulationrecord component.- Returns:
- the value of the
populationrecord component
-
growthRate
public double growthRate()Returns the value of thegrowthRaterecord component.- Returns:
- the value of the
growthRaterecord component
-
region
-
reliability
public double reliability()Returns the value of thereliabilityrecord component.- Returns:
- the value of the
reliabilityrecord component
-