Record Class UrbanEvolutionEngine.CityState
java.lang.Object
java.lang.Record
org.episteme.social.architecture.UrbanEvolutionEngine.CityState
- All Implemented Interfaces:
Serializable
- Enclosing class:
UrbanEvolutionEngine
public static record UrbanEvolutionEngine.CityState(String name, int year, int population, UrbanEvolutionEngine.HistoricalPeriod period, Map<UrbanEvolutionEngine.ArchitecturalStyle, Double> styleDistribution, List<UrbanEvolutionEngine.Building> notableBuildings, double prosperity, double religiousInfluence, double commercialActivity)
extends Record
implements Serializable
Snapshots the complete state of a city at a specific moment in history.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCityState(String name, int year, int population, UrbanEvolutionEngine.HistoricalPeriod period, Map<UrbanEvolutionEngine.ArchitecturalStyle, Double> styleDistribution, List<UrbanEvolutionEngine.Building> notableBuildings, double prosperity, double religiousInfluence, double commercialActivity) Creates an instance of aCityStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecommercialActivityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thenotableBuildingsrecord component.period()Returns the value of theperiodrecord component.intReturns the value of thepopulationrecord component.doubleReturns the value of theprosperityrecord component.doubleReturns the value of thereligiousInfluencerecord component.Returns the value of thestyleDistributionrecord component.final StringtoString()Returns a string representation of this record class.intyear()Returns the value of theyearrecord component.
-
Constructor Details
-
CityState
public CityState(String name, int year, int population, UrbanEvolutionEngine.HistoricalPeriod period, Map<UrbanEvolutionEngine.ArchitecturalStyle, Double> styleDistribution, List<UrbanEvolutionEngine.Building> notableBuildings, double prosperity, double religiousInfluence, double commercialActivity) Creates an instance of aCityStaterecord class.- Parameters:
name- the value for thenamerecord componentyear- the value for theyearrecord componentpopulation- the value for thepopulationrecord componentperiod- the value for theperiodrecord componentstyleDistribution- the value for thestyleDistributionrecord componentnotableBuildings- the value for thenotableBuildingsrecord componentprosperity- the value for theprosperityrecord componentreligiousInfluence- the value for thereligiousInfluencerecord componentcommercialActivity- the value for thecommercialActivityrecord 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. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
year
public int year()Returns the value of theyearrecord component.- Returns:
- the value of the
yearrecord component
-
population
public int population()Returns the value of thepopulationrecord component.- Returns:
- the value of the
populationrecord component
-
period
Returns the value of theperiodrecord component.- Returns:
- the value of the
periodrecord component
-
styleDistribution
Returns the value of thestyleDistributionrecord component.- Returns:
- the value of the
styleDistributionrecord component
-
notableBuildings
Returns the value of thenotableBuildingsrecord component.- Returns:
- the value of the
notableBuildingsrecord component
-
prosperity
public double prosperity()Returns the value of theprosperityrecord component.- Returns:
- the value of the
prosperityrecord component
-
religiousInfluence
public double religiousInfluence()Returns the value of thereligiousInfluencerecord component.- Returns:
- the value of the
religiousInfluencerecord component
-
commercialActivity
public double commercialActivity()Returns the value of thecommercialActivityrecord component.- Returns:
- the value of the
commercialActivityrecord component
-