Package: matlab.unittest.constraints
Superclasses: matlab.unittest.constraints.Constraint
Interface class for boolean combinations of constraints
The BooleanConstraint
interface class provides
an interface for boolean combinations of Constraints
.
Any constraint that derives from BooleanConstraint
can
be combined and negated using the and
(&
), or
(|
),
and not
(~
) operators.
Classes that derive from the BooleanConstraint
interface
class must implement everything required by the standard Constraint
interface.
When a given constraint is negated, the diagnostics must be written
in a different form than for a standard (non-negated) failure. Therefore,
classes deriving from the BooleanConstraint
class must
implement a method to provide a Diagnostic
object for
the negated case, in addition to the non-negated case.
In exchange for meeting these requirements, all BooleanConstraint
implementations
inherit the appropriate MATLAB® overloads for and
, or
,
and not
so that they can be combined with other BooleanConstraint
objects
or negated.
getNegativeDiagnosticFor | Produce negated diagnostic for value |
Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB documentation.