Record Class ConstraintVerdict
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spi.ConstraintVerdict
- Record Components:
constraintId- theConstraint.id()satisfied- whether the portfolio is allowedreason- why it failed, or what was verified; shown to the reader
public record ConstraintVerdict(String constraintId, boolean satisfied, String reason)
extends Record
The outcome of checking one
Constraint against one portfolio.-
Constructor Summary
ConstructorsConstructorDescriptionConstraintVerdict(String constraintId, boolean satisfied, String reason) Creates an instance of aConstraintVerdictrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstraintIdrecord component.final booleanIndicates whether some other object is "equal to" this one.static ConstraintVerdictfinal inthashCode()Returns a hash code value for this object.static ConstraintVerdictreason()Returns the value of thereasonrecord component.booleanReturns the value of thesatisfiedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConstraintVerdict
Creates an instance of aConstraintVerdictrecord class.- Parameters:
constraintId- the value for theconstraintIdrecord componentsatisfied- the value for thesatisfiedrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
pass
- Parameters:
constraintId- the constraintreason- what was verified- Returns:
- a passing verdict
-
fail
- Parameters:
constraintId- the constraintreason- why the portfolio is not allowed- Returns:
- a failing verdict
-
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. -
constraintId
Returns the value of theconstraintIdrecord component.- Returns:
- the value of the
constraintIdrecord component
-
satisfied
-
reason
-