Record Class ObjectiveValue
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spi.ObjectiveValue
- Record Components:
value- the measurement in the objective's unit;Double.NaNwhenknownis falseknown-falsewhen the objective could not be measured (missing data), which is reported as unknown and never treated as a good or a bad valueexplanation- how the value was reached, or why it is unknown; shown to the reader
-
Constructor Summary
ConstructorsConstructorDescriptionObjectiveValue(double value, boolean known, String explanation) Rejects a known value that is not a finite number. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexplanationrecord component.final inthashCode()Returns a hash code value for this object.booleanknown()Returns the value of theknownrecord component.static ObjectiveValuefinal StringtoString()Returns a string representation of this record class.static ObjectiveValuedoublevalue()Returns the value of thevaluerecord component.
-
Constructor Details
-
ObjectiveValue
Rejects a known value that is not a finite number.
-
-
Method Details
-
of
- Parameters:
value- the measurementexplanation- how it was reached- Returns:
- a known value
-
unknown
- Parameters:
reason- why the objective could not be measured- Returns:
- an unknown value
-
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. -
value
-
known
-
explanation
Returns the value of theexplanationrecord component.- Returns:
- the value of the
explanationrecord component
-