Record Class RestorationSimulator.ConservationTreatment
java.lang.Object
java.lang.Record
org.episteme.social.arts.RestorationSimulator.ConservationTreatment
- All Implemented Interfaces:
Serializable
- Enclosing class:
RestorationSimulator
public static record RestorationSimulator.ConservationTreatment(String name, Set<RestorationSimulator.DegradationType> addresses, double effectiveness, double cost, int durationDays)
extends Record
implements Serializable
Represents a specific technical intervention.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConservationTreatment(String name, Set<RestorationSimulator.DegradationType> addresses, double effectiveness, double cost, int durationDays) Creates an instance of aConservationTreatmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaddressesrecord component.doublecost()Returns the value of thecostrecord component.intReturns the value of thedurationDaysrecord component.doubleReturns the value of theeffectivenessrecord 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConservationTreatment
public ConservationTreatment(String name, Set<RestorationSimulator.DegradationType> addresses, double effectiveness, double cost, int durationDays) Creates an instance of aConservationTreatmentrecord class.- Parameters:
name- the value for thenamerecord componentaddresses- the value for theaddressesrecord componenteffectiveness- the value for theeffectivenessrecord componentcost- the value for thecostrecord componentdurationDays- the value for thedurationDaysrecord 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
-
addresses
Returns the value of theaddressesrecord component.- Returns:
- the value of the
addressesrecord component
-
effectiveness
public double effectiveness()Returns the value of theeffectivenessrecord component.- Returns:
- the value of the
effectivenessrecord component
-
cost
public double cost()Returns the value of thecostrecord component.- Returns:
- the value of the
costrecord component
-
durationDays
public int durationDays()Returns the value of thedurationDaysrecord component.- Returns:
- the value of the
durationDaysrecord component
-