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 count
growthRate - annual growth rate (as a decimal, e.g., 0.01 for 1%)
region - geographical region identifier
reliability - 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 Details

    • DemographicSnapshot

      public DemographicSnapshot(TimeCoordinate date, long population, double growthRate, String region, double reliability)
      Creates an instance of a DemographicSnapshot record class.
      Parameters:
      date - the value for the date record component
      population - the value for the population record component
      growthRate - the value for the growthRate record component
      region - the value for the region record component
      reliability - the value for the reliability 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • date

      public TimeCoordinate date()
      Returns the value of the date record component.
      Returns:
      the value of the date record component
    • population

      public long population()
      Returns the value of the population record component.
      Returns:
      the value of the population record component
    • growthRate

      public double growthRate()
      Returns the value of the growthRate record component.
      Returns:
      the value of the growthRate record component
    • region

      public String region()
      Returns the value of the region record component.
      Returns:
      the value of the region record component
    • reliability

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