<html> | |
<head> | |
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>OclComparable</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="OclAny.html" title="OclAny"> | |
<link rel="next" href="OclElement.html" title="OclElement"> | |
</head> | |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> | |
OclComparable | |
</h1> | |
<div class="section" title="OclComparable"> | |
<div class="titlepage"> | |
<div> | |
<div> | |
<h2 class="title" style="clear: both"> | |
<a name="OclComparable"></a> | |
<span class="bold"><strong> | |
<code class="code">OclComparable</code> | |
</strong></span> | |
</h2> | |
</div> | |
</div> | |
</div> | |
<p>The type OclComparable defines the compareTo operation used by the sortedBy iteration. Only types that provide a derived | |
compareTo implementation may be sorted.</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"><(that : OclSelf[?]) : Boolean[1]</code> | |
precedence: | |
<code class="code">RELATIONAL</code> | |
</p> | |
<p>True if | |
<code class="code">self</code> is less than | |
<code class="code">that</code>. | |
</p> | |
<p> | |
<code class="code"><=(that : OclSelf[?]) : Boolean[1]</code> | |
precedence: | |
<code class="code">RELATIONAL</code> | |
</p> | |
<p>True if | |
<code class="code">self</code> is less than or equal to | |
<code class="code">that</code>. | |
</p> | |
<p> | |
<code class="code">>=(that : OclSelf[?]) : Boolean[1]</code> | |
precedence: | |
<code class="code">RELATIONAL</code> | |
</p> | |
<p>True if | |
<code class="code">self</code> is greater than or equal to | |
<code class="code">that</code>. | |
</p> | |
<p> | |
<code class="code">>(that : OclSelf[?]) : Boolean[1]</code> | |
precedence: | |
<code class="code">RELATIONAL</code> | |
</p> | |
<p>True if | |
<code class="code">self</code> is greater than | |
<code class="code">that</code>. | |
</p> | |
<p> | |
<code class="code">compareTo(that : OclSelf[?]) : Integer[1]</code> | |
</p> | |
<p>Return -ve, 0, +ve according to whether self is less than, equal to , or greater than that.</p> | |
<p>The compareTo operation should be commutative.</p> | |
</div> | |
</body> | |
</html> |