Package de.chojo.universalis.entities
Record Class QualityIndicator<T>
java.lang.Object
java.lang.Record
de.chojo.universalis.entities.QualityIndicator<T>
- Type Parameters:
T- type of indicator data- Record Components:
general- general datanormalQuality- normal quality datahighQuality- high quality data
Indicator for providing data based on the quality of an item
-
Constructor Summary
ConstructorsConstructorDescriptionQualityIndicator(T general, T normalQuality, T highQuality) Creates an instance of aQualityIndicatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.general()Returns the value of thegeneralrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehighQualityrecord component.Returns the value of thenormalQualityrecord component.static <T> QualityIndicator<T>of(T general, T normalQuality, T highQuality) Create a new quality indicatorfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QualityIndicator
Creates an instance of aQualityIndicatorrecord class.- Parameters:
general- the value for thegeneralrecord componentnormalQuality- the value for thenormalQualityrecord componenthighQuality- the value for thehighQualityrecord component
-
-
Method Details
-
of
Create a new quality indicator- Type Parameters:
T- type of indicator data- Parameters:
general- general datanormalQuality- normal quality datahighQuality- high quality data- Returns:
- new indicator
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
general
Returns the value of thegeneralrecord component.- Returns:
- the value of the
generalrecord component
-
normalQuality
Returns the value of thenormalQualityrecord component.- Returns:
- the value of the
normalQualityrecord component
-
highQuality
Returns the value of thehighQualityrecord component.- Returns:
- the value of the
highQualityrecord component
-