Record Class UrbanEvolutionEngine.Building
java.lang.Object
java.lang.Record
org.episteme.social.architecture.UrbanEvolutionEngine.Building
- All Implemented Interfaces:
Serializable
- Enclosing class:
UrbanEvolutionEngine
public static record UrbanEvolutionEngine.Building(String name, UrbanEvolutionEngine.BuildingType type, UrbanEvolutionEngine.ArchitecturalStyle style, int constructionYear, int demolitionYear, double importance)
extends Record
implements Serializable
Represents a single notable building within the city.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBuilding(String name, UrbanEvolutionEngine.BuildingType type, UrbanEvolutionEngine.ArchitecturalStyle style, int constructionYear, int demolitionYear, double importance) Creates an instance of aBuildingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theconstructionYearrecord component.intReturns the value of thedemolitionYearrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theimportancerecord component.name()Returns the value of thenamerecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Building
public Building(String name, UrbanEvolutionEngine.BuildingType type, UrbanEvolutionEngine.ArchitecturalStyle style, int constructionYear, int demolitionYear, double importance) Creates an instance of aBuildingrecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componentstyle- the value for thestylerecord componentconstructionYear- the value for theconstructionYearrecord componentdemolitionYear- the value for thedemolitionYearrecord componentimportance- the value for theimportancerecord 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
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-
constructionYear
public int constructionYear()Returns the value of theconstructionYearrecord component.- Returns:
- the value of the
constructionYearrecord component
-
demolitionYear
public int demolitionYear()Returns the value of thedemolitionYearrecord component.- Returns:
- the value of the
demolitionYearrecord component
-
importance
public double importance()Returns the value of theimportancerecord component.- Returns:
- the value of the
importancerecord component
-