blob: 61d23f557f13c31e88f1cded4969947292f32956 [file] [log] [blame]
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>OclVoid</title>
<link href="book.css" rel="stylesheet" type="text/css">
<meta content="DocBook XSL Stylesheets V1.75.1" name="generator">
<link rel="home" href="index.html" title="OCL Documentation">
<link rel="up" href="StandardLibrary.html" title="The OCL Standard Library">
<link rel="prev" href="OclType.html" title="OclType">
<link rel="next" href="OrderedCollection.html" title="OrderedCollection(T)">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
OclVoid
</h1>
<div class="section" title="OclVoid">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both">
<a name="OclVoid"></a>
<span class="bold"><strong>
<code class="code">OclVoid</code>
</strong></span>
</h2>
</div>
</div>
</div>
<p>The type OclVoid is a type that conforms to all other types except OclInvalid.
It has one single instance, identified as
<code class="code">null</code>, that corresponds with the UML LiteralNull value specification.
Any property call applied on
<code class="code">null</code> results in
<code class="code">invalid</code>, except for the
oclIsUndefined(), oclIsInvalid(), =(OclAny) and &lt;&gt;(OclAny) operations.
However, by virtue of the implicit conversion to a collection literal,
an expression evaluating to
<code class="code">null</code> can be used as source of collection operations (such as &lsquo;isEmpty&rsquo;).
If the source is the
<code class="code">null</code> literal, it is implicitly converted to Bag{}.
</p>
<p>OclVoid is itself an instance of the metatype VoidType.</p>
<p>conformsTo
<a class="link" href="OclAny.html" title="OclAny">
<code class="code">OclAny</code>
</a>
</p>
<p>
<span class="bold"><strong>Operations</strong></span>
</p>
<p>
<code class="code">=(object2 : OclSelf[?]) : Boolean[1]</code>
precedence:
<code class="code">EQUALITY</code>
</p>
<p>Redefines the OclAny operation, returning
<code class="code">true</code> if object is
<code class="code">null</code>,
<code class="code">invalid</code>
if object is
<code class="code">invalid</code>,
<code class="code">false</code> otherwise.
</p>
<p>
<code class="code">&lt;&gt;(object2 : OclSelf[?]) : Boolean[1]</code>
precedence:
<code class="code">EQUALITY</code>
</p>
<p>
<code class="code">allInstances() : Set(OclSelf[*|?])</code>
</p>
<p>Returns
<code class="code">Set{null}</code>.
</p>
<p>
<code class="code">and(b : Boolean[?]) : Boolean[?]</code>
precedence:
<code class="code">AND</code>
</p>
<p>
<code class="code">implies(b : Boolean[?]) : Boolean[?]</code>
precedence:
<code class="code">IMPLIES</code>
</p>
<p>
<code class="code">oclAsSet() : Set(OclSelf)</code>
</p>
<p>
<code class="code">oclIsInvalid() : Boolean[1] validating</code>
</p>
<p>
<code class="code">oclIsUndefined() : Boolean[1] validating</code>
</p>
<p>
<code class="code">or(b : Boolean[?]) : Boolean[?]</code>
precedence:
<code class="code">OR</code>
</p>
<p>
<code class="code">toString() : String[1]</code>
</p>
<p>Returns
<code class="code">null</code>.
</p>
</div>
</body>
</html>