Record Class RestorationSimulator.DegradationState
java.lang.Object
java.lang.Record
org.episteme.social.arts.RestorationSimulator.DegradationState
- All Implemented Interfaces:
Serializable
- Enclosing class:
RestorationSimulator
public static record RestorationSimulator.DegradationState(int ageYears, Map<RestorationSimulator.DegradationType, Double> severity, double overallCondition)
extends Record
implements Serializable
Represents the quantified state of damage for an artwork.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDegradationState(int ageYears, Map<RestorationSimulator.DegradationType, Double> severity, double overallCondition) Creates an instance of aDegradationStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintageYears()Returns the value of theageYearsrecord 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 theoverallConditionrecord component.severity()Returns the value of theseverityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DegradationState
public DegradationState(int ageYears, Map<RestorationSimulator.DegradationType, Double> severity, double overallCondition) Creates an instance of aDegradationStaterecord class.- Parameters:
ageYears- the value for theageYearsrecord componentseverity- the value for theseverityrecord componentoverallCondition- the value for theoverallConditionrecord 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. -
ageYears
public int ageYears()Returns the value of theageYearsrecord component.- Returns:
- the value of the
ageYearsrecord component
-
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
overallCondition
public double overallCondition()Returns the value of theoverallConditionrecord component.- Returns:
- the value of the
overallConditionrecord component
-