Record Class PigmentSpectroscopy.Pigment
java.lang.Object
java.lang.Record
org.episteme.social.arts.PigmentSpectroscopy.Pigment
- Enclosing class:
PigmentSpectroscopy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechemicalFormularecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theintroductionYearrecord component.name()Returns the value of thenamerecord component.intReturns the value of theobsolescenceYearrecord component.double[]Returns the value of thereflectanceSpectrumrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pigment
public Pigment(String name, String chemicalFormula, int introductionYear, int obsolescenceYear, double[] reflectanceSpectrum) Creates an instance of aPigmentrecord class.- Parameters:
name- the value for thenamerecord componentchemicalFormula- the value for thechemicalFormularecord componentintroductionYear- the value for theintroductionYearrecord componentobsolescenceYear- the value for theobsolescenceYearrecord componentreflectanceSpectrum- the value for thereflectanceSpectrumrecord 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
-
chemicalFormula
Returns the value of thechemicalFormularecord component.- Returns:
- the value of the
chemicalFormularecord component
-
introductionYear
public int introductionYear()Returns the value of theintroductionYearrecord component.- Returns:
- the value of the
introductionYearrecord component
-
obsolescenceYear
public int obsolescenceYear()Returns the value of theobsolescenceYearrecord component.- Returns:
- the value of the
obsolescenceYearrecord component
-
reflectanceSpectrum
public double[] reflectanceSpectrum()Returns the value of thereflectanceSpectrumrecord component.- Returns:
- the value of the
reflectanceSpectrumrecord component
-