<html> | |
<head> | |
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>OclSummable</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="OclState.html" title="OclState"> | |
<link rel="next" href="OclTuple.html" title="OclTuple"> | |
</head> | |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
<h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> | |
OclSummable | |
</h1> | |
<div class="section" title="OclSummable"> | |
<div class="titlepage"> | |
<div> | |
<div> | |
<h2 class="title" style="clear: both"> | |
<a name="OclSummable"></a> | |
<span class="bold"><strong> | |
<code class="code">OclSummable</code> | |
</strong></span> | |
</h2> | |
</div> | |
</div> | |
</div> | |
<p>The type OclSummable defines the sum and zero operations used by the Collection::sum iteration. Only types that provide derived | |
sum and zero implementations may be summed.</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">sum(that : OclSelf[?]) : OclSelf[?]</code> | |
</p> | |
<p>Return the sum of self and that.</p> | |
<p>The sum operation should be associative.</p> | |
<p> | |
<code class="code">zero() : OclSelf[?]</code> | |
</p> | |
<p>Return the ‘zero’ value of self to initialize a summation.</p> | |
<p>zero().sum(self) = self.</p> | |
</div> | |
</body> | |
</html> |