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 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 a CityState record class.
      Parameters:
      name - the value for the name record component
      year - the value for the year record component
      population - the value for the population record component
      period - the value for the period record component
      styleDistribution - the value for the styleDistribution record component
      notableBuildings - the value for the notableBuildings record component
      prosperity - the value for the prosperity record component
      religiousInfluence - the value for the religiousInfluence record component
      commercialActivity - the value for the commercialActivity 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • year

      public int year()
      Returns the value of the year record component.
      Returns:
      the value of the year record component
    • population

      public int population()
      Returns the value of the population record component.
      Returns:
      the value of the population record component
    • period

      Returns the value of the period record component.
      Returns:
      the value of the period record component
    • styleDistribution

      public Map<UrbanEvolutionEngine.ArchitecturalStyle, Double> styleDistribution()
      Returns the value of the styleDistribution record component.
      Returns:
      the value of the styleDistribution record component
    • notableBuildings

      public List<UrbanEvolutionEngine.Building> notableBuildings()
      Returns the value of the notableBuildings record component.
      Returns:
      the value of the notableBuildings record component
    • prosperity

      public double prosperity()
      Returns the value of the prosperity record component.
      Returns:
      the value of the prosperity record component
    • religiousInfluence

      public double religiousInfluence()
      Returns the value of the religiousInfluence record component.
      Returns:
      the value of the religiousInfluence record component
    • commercialActivity

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