matlab.unittest.constraints.PublicPropertyComparator class
Package: matlab.unittest.constraints
Comparator for public properties of MATLAB objects
Description
The PublicPropertyComparator
compares public
properties of MATLAB® objects.
The PublicPropertyComparator
supports MATLAB objects
or arrays of objects and recursively compares data structures contained
in the public properties. The PublicPropertyComparator
is
different from the isequal
function because it
examines only the public properties of the objects.
Typically you construct a PublicPropertyComparator
using
the supportingAllValues
static
method.
Construction
PublicPropertyComparator
creates a comparator
for public properties of MATLAB objects. This comparator supports
only objects with no public properties.
PublicPropertyComparator(
indicates
a comparator, compObj
)compObj
, that defines the comparator
used to compare public properties. This comparator supports recursion
only in the data types supported by compObj
.
PublicPropertyComparator(
provides
a comparator with additional options specified by one or more compObj
,Name,Value
)Name,Value
pair
arguments.
Methods
supportingAllValues | Comparator for public properties that supports any value in recursion |
Input Arguments
Properties
|
Properties to ignore during object comparison, specified in
the name-value pair argument, |
|
Indicator of whether comparator operates recursively, specified
in the name-value pair argument, |
Limitations
The
PublicPropertyComparator
does not compare public properties of objects that overload thesubsref
,numel
, orproperties
functions.
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.