Representation of the Equals Constraint. This constraint can be used independently or added to a And, Or, Not constraint to combine with other constraints. Extends BinaryConstraint.
EqConstraint(): Constructs a default equals constraint.
, setMatchMode
See Constraint: getFact, getFactValue, getReason, getValue, setFact, setFactValue, setReason, setValue.
Example of a Constraint to find resources that are running on Linux:
eq = EqConstraint() eq.setFact("resource.os.family") eq.setValue("linux")
Example of a Constraint to match resource IDs using a regular expression:
eq = EqConstraint() eq.setFact("resource.id") eq.setValue("webserver*") eq.setMatchMode(EqConstraint.MATCH_MODE_REGEXP)
Javadoc: EqConstraint