Package de.xam.featdoc.system
Record Class Condition.Variant
java.lang.Object
java.lang.Record
de.xam.featdoc.system.Condition.Variant
- Record Components:
label-probability- does not need to add up to 1, is auto-normalized. Just use '1' everywhere for equal probability
- Enclosing class:
- Condition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.label()Returns the value of thelabelrecord component.doubleReturns the value of theprobabilityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Variant
Creates an instance of aVariantrecord class.- Parameters:
condition- the value for theconditionrecord componentlabel- the value for thelabelrecord componentprobability- the value for theprobabilityrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
probability
public double probability()Returns the value of theprobabilityrecord component.- Returns:
- the value of the
probabilityrecord component
-