matlab.mixin.SetGet class

Package: matlab.mixin

Derive handle classes with set and get methods

    Note:   hgsetget will be removed in a future release. Use matlab.mixin.SetGet instead.

Description

classdef MySubClass < matlab.mixin.SetGet subclasses the matlab.mixin.SetGet class. matlab.mixin.SetGet is a subclass of the handle class.

Use the matlab.mixin.SetGet class to derive classes that inherit set and get methods that behave like MATLAB® graphics set and get functions.

The set and get methods inherited from matlab.mixin.SetGet support inexact property name matching. You can use a combination of partial and case-insensitive names as long as the inexact name is not ambiguous. Dot-based property references require exact property name matches.

Methods

MethodPurpose
setAssigns values to the specified properties or returns a cell array of possible values for writable properties.
getReturns value of specified property or a struct with all property values.
setdispImplicitly called when set is called with no output arguments and a handle array, but no property name. Override this method to change what set displays.
getdispImplicitly called when get is called with no output arguments and handle array, but no property name. Override this method to change what get displays.

Attributes

Abstracttrue
ConstructOnLoadtrue
HandleCompatibletrue

To learn about attributes of classes, see Class Attributes in the MATLAB Object-Oriented Programming documentation.

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Using Handles in the MATLAB documentation.

Introduced in R2014b

Was this topic helpful?