Record Class Demography.PopulationPyramid
java.lang.Object
java.lang.Record
org.episteme.social.sociology.Demography.PopulationPyramid
- All Implemented Interfaces:
Serializable
- Enclosing class:
Demography
public static record Demography.PopulationPyramid(int[] maleCounts, int[] femaleCounts)
extends Record
implements Serializable
Data structure representing the age and gender distribution of a population.
Male and female counts should follow standard cohort groupings (e.g., 5-year intervals).
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPopulationPyramid(int[] maleCounts, int[] femaleCounts) Creates an instance of aPopulationPyramidrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.int[]Returns the value of thefemaleCountsrecord component.final inthashCode()Returns a hash code value for this object.int[]Returns the value of themaleCountsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PopulationPyramid
public PopulationPyramid(int[] maleCounts, int[] femaleCounts) Creates an instance of aPopulationPyramidrecord class.- Parameters:
maleCounts- the value for themaleCountsrecord componentfemaleCounts- the value for thefemaleCountsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
maleCounts
public int[] maleCounts()Returns the value of themaleCountsrecord component.- Returns:
- the value of the
maleCountsrecord component
-
femaleCounts
public int[] femaleCounts()Returns the value of thefemaleCountsrecord component.- Returns:
- the value of the
femaleCountsrecord component
-