Record Class SustainableMaterialOptimizer.MaterialData
java.lang.Object
java.lang.Record
org.episteme.social.architecture.SustainableMaterialOptimizer.MaterialData
- All Implemented Interfaces:
Serializable
- Enclosing class:
SustainableMaterialOptimizer
public static record SustainableMaterialOptimizer.MaterialData(String name, double embodiedCarbonKgCO2PerKg, double densityKgM3, double recycledContentRatio, double costPerKg)
extends Record
implements Serializable
Environmental and economic data for a specific construction material.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMaterialData(String name, double embodiedCarbonKgCO2PerKg, double densityKgM3, double recycledContentRatio, double costPerKg) Creates an instance of aMaterialDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecostPerKgrecord component.doubleReturns the value of thedensityKgM3record component.doubleReturns the value of theembodiedCarbonKgCO2PerKgrecord 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.doubleReturns the value of therecycledContentRatiorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MaterialData
public MaterialData(String name, double embodiedCarbonKgCO2PerKg, double densityKgM3, double recycledContentRatio, double costPerKg) Creates an instance of aMaterialDatarecord class.- Parameters:
name- the value for thenamerecord componentembodiedCarbonKgCO2PerKg- the value for theembodiedCarbonKgCO2PerKgrecord componentdensityKgM3- the value for thedensityKgM3record componentrecycledContentRatio- the value for therecycledContentRatiorecord componentcostPerKg- the value for thecostPerKgrecord 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
-
embodiedCarbonKgCO2PerKg
public double embodiedCarbonKgCO2PerKg()Returns the value of theembodiedCarbonKgCO2PerKgrecord component.- Returns:
- the value of the
embodiedCarbonKgCO2PerKgrecord component
-
densityKgM3
public double densityKgM3()Returns the value of thedensityKgM3record component.- Returns:
- the value of the
densityKgM3record component
-
recycledContentRatio
public double recycledContentRatio()Returns the value of therecycledContentRatiorecord component.- Returns:
- the value of the
recycledContentRatiorecord component
-
costPerKg
public double costPerKg()Returns the value of thecostPerKgrecord component.- Returns:
- the value of the
costPerKgrecord component
-