Record Class FireEscapeAnalyzer.Compartment
java.lang.Object
java.lang.Record
org.episteme.social.architecture.FireEscapeAnalyzer.Compartment
- All Implemented Interfaces:
Serializable
- Enclosing class:
FireEscapeAnalyzer
public static record FireEscapeAnalyzer.Compartment(String id, double area, int occupancy, double travelDistance, List<String> connectedExits)
extends Record
implements Serializable
Represents a distinct area or room in a building with specific occupancy.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompartment(String id, double area, int occupancy, double travelDistance, List<String> connectedExits) Creates an instance of aCompartmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublearea()Returns the value of thearearecord component.Returns the value of theconnectedExitsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.intReturns the value of theoccupancyrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetravelDistancerecord component.
-
Constructor Details
-
Compartment
public Compartment(String id, double area, int occupancy, double travelDistance, List<String> connectedExits) Creates an instance of aCompartmentrecord class.- Parameters:
id- the value for theidrecord componentarea- the value for thearearecord componentoccupancy- the value for theoccupancyrecord componenttravelDistance- the value for thetravelDistancerecord componentconnectedExits- the value for theconnectedExitsrecord 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. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
area
public double area()Returns the value of thearearecord component.- Returns:
- the value of the
arearecord component
-
occupancy
public int occupancy()Returns the value of theoccupancyrecord component.- Returns:
- the value of the
occupancyrecord component
-
travelDistance
public double travelDistance()Returns the value of thetravelDistancerecord component.- Returns:
- the value of the
travelDistancerecord component
-
connectedExits
-