| <html> | |
| <head> | |
| <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
| <title>Real</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="OrderedSet.html" title="OrderedSet(T)"> | |
| <link rel="next" href="Sequence.html" title="Sequence(T)"> | |
| </head> | |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
| <h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> | |
| Real | |
| </h1> | |
| <div class="section" title="Real"> | |
| <div class="titlepage"> | |
| <div> | |
| <div> | |
| <h2 class="title" style="clear: both"> | |
| <a name="Real"></a> | |
| <span class="bold"><strong> | |
| <code class="code">Real</code> | |
| </strong></span> | |
| </h2> | |
| </div> | |
| </div> | |
| </div> | |
| <p>The standard type Real represents the mathematical concept of real. | |
| Note that Integer is a subclass of Real, | |
| so for each parameter of type Real, you can use an integer as the actual parameter. | |
| Real is itself an instance of the metatype PrimitiveType (from UML).</p> | |
| <p>conformsTo | |
| <a class="link" href="OclComparable.html" title="OclComparable"> | |
| <code class="code">OclComparable</code> | |
| </a>, | |
| <a class="link" href="OclSummable.html" title="OclSummable"> | |
| <code class="code">OclSummable</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>Returns | |
| <code class="code">true</code> if the numeric value of | |
| <code class="code">self</code> is the same as the numeric value of object2, | |
| <code class="code">false</code> otherwise. | |
| </p> | |
| <p> | |
| <code class="code"><>(object2 : OclSelf[?]) : Boolean[1]</code> | |
| precedence: | |
| <code class="code">EQUALITY</code> | |
| </p> | |
| <p>Returns | |
| <code class="code">true</code> if the numeric value of | |
| <code class="code">self</code> is the not the same as the numeric value of object2, | |
| <code class="code">false</code> otherwise. | |
| </p> | |
| <p> | |
| <code class="code">*(r : OclSelf[?]) : Real[1]</code> | |
| precedence: | |
| <code class="code">MULTIPLICATIVE</code> | |
| </p> | |
| <p>The value of the multiplication of | |
| <code class="code">self</code> and r. | |
| </p> | |
| <p> | |
| <code class="code">+(r : OclSelf[?]) : Real[1]</code> | |
| precedence: | |
| <code class="code">ADDITIVE</code> | |
| </p> | |
| <p>The value of the addition of | |
| <code class="code">self</code> and r. | |
| </p> | |
| <p> | |
| <code class="code">-() : Real[1]</code> | |
| precedence: | |
| <code class="code">UNARY</code> | |
| </p> | |
| <p>The negative value of | |
| <code class="code">self</code>. | |
| </p> | |
| <p> | |
| <code class="code">-(r : OclSelf[?]) : Real[1]</code> | |
| precedence: | |
| <code class="code">ADDITIVE</code> | |
| </p> | |
| <p>The value of the subtraction of r from | |
| <code class="code">self</code>. | |
| </p> | |
| <p> | |
| <code class="code">/(r : OclSelf[?]) : Real[1] invalidating</code> | |
| precedence: | |
| <code class="code">MULTIPLICATIVE</code> | |
| </p> | |
| <p>The value of | |
| <code class="code">self</code> divided by r. Evaluates to | |
| <code class="code">invalid</code> if r is equal to zero. | |
| </p> | |
| <p> | |
| <code class="code">abs() : Real[1]</code> | |
| </p> | |
| <p>The absolute value of | |
| <code class="code">self</code>. | |
| </p> | |
| <p> | |
| <code class="code">floor() : Integer[1]</code> | |
| </p> | |
| <p>The largest integer that is less than or equal to | |
| <code class="code">self</code>. | |
| </p> | |
| <p> | |
| <code class="code">max(r : OclSelf[?]) : Real[1]</code> | |
| </p> | |
| <p>The maximum of | |
| <code class="code">self</code> and r. | |
| </p> | |
| <p> | |
| <code class="code">min(r : OclSelf[?]) : Real[1]</code> | |
| </p> | |
| <p>The minimum of | |
| <code class="code">self</code> and r. | |
| </p> | |
| <p> | |
| <code class="code">round() : Integer[1]</code> | |
| </p> | |
| <p>The integer that is closest to | |
| <code class="code">self</code>. When there are two such integers, the largest one. | |
| </p> | |
| <p> | |
| <code class="code">toString() : String[1]</code> | |
| </p> | |
| <p>Converts | |
| <code class="code">self</code> to a string value. | |
| </p> | |
| </div> | |
| </body> | |
| </html> |