matlab.unittest.constraints.BooleanConstraint class
Package: matlab.unittest.constraints
Superclasses: matlab.unittest.constraints.Constraint
Interface class for Boolean combinations of constraints
Description
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.
Methods
getNegativeDiagnosticFor | Produce negated diagnostic for value |
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.