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

    Constructors
    Constructor
    Description
    MaterialData(String name, double embodiedCarbonKgCO2PerKg, double densityKgM3, double recycledContentRatio, double costPerKg)
    Creates an instance of a MaterialData record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the costPerKg record component.
    double
    Returns the value of the densityKgM3 record component.
    double
    Returns the value of the embodiedCarbonKgCO2PerKg record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the name record component.
    double
    Returns the value of the recycledContentRatio record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MaterialData

      public MaterialData(String name, double embodiedCarbonKgCO2PerKg, double densityKgM3, double recycledContentRatio, double costPerKg)
      Creates an instance of a MaterialData record class.
      Parameters:
      name - the value for the name record component
      embodiedCarbonKgCO2PerKg - the value for the embodiedCarbonKgCO2PerKg record component
      densityKgM3 - the value for the densityKgM3 record component
      recycledContentRatio - the value for the recycledContentRatio record component
      costPerKg - the value for the costPerKg 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
    • embodiedCarbonKgCO2PerKg

      public double embodiedCarbonKgCO2PerKg()
      Returns the value of the embodiedCarbonKgCO2PerKg record component.
      Returns:
      the value of the embodiedCarbonKgCO2PerKg record component
    • densityKgM3

      public double densityKgM3()
      Returns the value of the densityKgM3 record component.
      Returns:
      the value of the densityKgM3 record component
    • recycledContentRatio

      public double recycledContentRatio()
      Returns the value of the recycledContentRatio record component.
      Returns:
      the value of the recycledContentRatio record component
    • costPerKg

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