matlab.mixin.indexing.RedefinesDot Class
R2026bNamespace: matlab.mixin.indexing
Customize class indexing operations that use dots
Description
The matlab.mixin.indexing.RedefinesDot class is an abstract superclass that
enables you to customize how index operations with dots behave. The
RedefinesParen and RedefinesBrace classes enable you to
customize indexing operations with parentheses and curly braces, respectively. You can inherit
from these classes individually, customizing one aspect of behavior without affecting the
default behavior of the other indexing operations.
To customize how your class handles indexing operations with dots, inherit from
RedefinesDot and implement its abstract methods:
dotAssigndotListLengthdotReference
RedefinesDot also provides two concrete
methods—parenDotAssign and parenDotListLength—that handle
assignment statements with built-in parentheses indexing immediately followed by customized
dot indexing, such as obj(idx).prop = val. These methods handle
combinations of parentheses and dot indexing for classes that inherit from
matlab.mixin.indexing.RedefinesDot but do not inherit from matlab.mixin.indexing.RedefinesParen. The two methods have default implementations
that provide the expected behavior, but you can override them if needed.
Class Attributes
Abstract | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Methods
Examples
Limitations
Inheriting from both matlab.mixin.indexing.RedefinesDot and
matlab.mixin.Heteroegenous is not supported.