OCLOperators oclIsTypeOf
(Automatically adding template at the end of the page.)
(One intermediate revision by the same user not shown)
Line 16: Line 16:
Too check if an Object inherits from another type use [[OCLOperators oclIsKindOf]]
Too check if an Object inherits from another type use [[OCLOperators oclIsKindOf]]
[[Category:OCL General Operators]]
[[Category:OCL General Operators]]
{{Edited|July|12|2024}}

Revision as of 15:42, 10 February 2024

This page was created by Alexandra on 2017-08-13. Last edited by Stephanie@mdriven.net on 2025-02-12.

oclIsTypeOf( typespec : Class ) : Boolean

Returns true if the type of self is the same as typespec - otherwise, returns false. This operation allows users to check the exact class type of self.

Expression Result
anEmployee.oclIsTypeOf(Employee) true
anEmployee.oclIsTypeOf(Person) false
aCat.oclIsTypeOf(Person) false

Too check if an Object inherits from another type use OCLOperators oclIsKindOf

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments