blob: 0850d54903cf550f695e34920c19657ec4c2ba80 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>DoubleArray</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DoubleArray";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../org/apache/openejb/math/util/MathUtils.html" title="class in org.apache.openejb.math.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/openejb/math/util/DoubleArray.html" target="_top">Frames</a></li>
<li><a href="DoubleArray.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.openejb.math.util</div>
<h2 title="Interface DoubleArray" class="title">Interface DoubleArray</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../org/apache/openejb/math/util/ResizableDoubleArray.html" title="class in org.apache.openejb.math.util">ResizableDoubleArray</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">DoubleArray</span></pre>
<div class="block">Provides a standard interface for double arrays. Allows different
array implementations to support various storage mechanisms
such as automatic expansion, contraction, and array "rolling".</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openejb/math/util/DoubleArray.html#addElement-double-">addElement</a></span>(double&nbsp;value)</code>
<div class="block">Adds an element to the end of this expandable array</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openejb/math/util/DoubleArray.html#addElementRolling-double-">addElementRolling</a></span>(double&nbsp;value)</code>
<div class="block">
Adds an element to the end of the array and removes the first
element in the array.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openejb/math/util/DoubleArray.html#clear--">clear</a></span>()</code>
<div class="block">Clear the double array</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openejb/math/util/DoubleArray.html#getElement-int-">getElement</a></span>(int&nbsp;index)</code>
<div class="block">Returns the element at the specified index.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openejb/math/util/DoubleArray.html#getElements--">getElements</a></span>()</code>
<div class="block">Returns a double[] array containing the elements of this
<code>DoubleArray</code>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openejb/math/util/DoubleArray.html#getNumElements--">getNumElements</a></span>()</code>
<div class="block">Returns the number of elements currently in the array.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/openejb/math/util/DoubleArray.html#setElement-int-double-">setElement</a></span>(int&nbsp;index,
double&nbsp;value)</code>
<div class="block">Sets the element at the specified index.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getNumElements--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumElements</h4>
<pre>int&nbsp;getNumElements()</pre>
<div class="block">Returns the number of elements currently in the array. Please note
that this may be different from the length of the internal storage array.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>number of elements</dd>
</dl>
</li>
</ul>
<a name="getElement-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getElement</h4>
<pre>double&nbsp;getElement(int&nbsp;index)</pre>
<div class="block">Returns the element at the specified index. Note that if an
out of bounds index is supplied a ArrayIndexOutOfBoundsException
will be thrown.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - index to fetch a value from</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>value stored at the specified index</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.ArrayIndexOutOfBoundsException</code> - if <code>index</code> is less than
zero or is greater than <code>getNumElements() - 1</code>.</dd>
</dl>
</li>
</ul>
<a name="setElement-int-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setElement</h4>
<pre>void&nbsp;setElement(int&nbsp;index,
double&nbsp;value)</pre>
<div class="block">Sets the element at the specified index. If the specified index is greater than
<code>getNumElements() - 1</code>, the <code>numElements</code> property
is increased to <code>index +1</code> and additional storage is allocated
(if necessary) for the new element and all (uninitialized) elements
between the new element and the previous end of the array).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - index to store a value in</dd>
<dd><code>value</code> - value to store at the specified index</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.ArrayIndexOutOfBoundsException</code> - if <code>index</code> is less than
zero.</dd>
</dl>
</li>
</ul>
<a name="addElement-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addElement</h4>
<pre>void&nbsp;addElement(double&nbsp;value)</pre>
<div class="block">Adds an element to the end of this expandable array</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - to be added to end of array</dd>
</dl>
</li>
</ul>
<a name="addElementRolling-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addElementRolling</h4>
<pre>double&nbsp;addElementRolling(double&nbsp;value)</pre>
<div class="block"><p>
Adds an element to the end of the array and removes the first
element in the array. Returns the discarded first element.
The effect is similar to a push operation in a FIFO queue.
<p>
Example: If the array contains the elements 1, 2, 3, 4 (in that order)
and addElementRolling(5) is invoked, the result is an array containing
the entries 2, 3, 4, 5 and the value returned is 1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>value</code> - the value to be added to the array</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value which has been discarded or "pushed" out of the array
by this rolling insert</dd>
</dl>
</li>
</ul>
<a name="getElements--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getElements</h4>
<pre>double[]&nbsp;getElements()</pre>
<div class="block">Returns a double[] array containing the elements of this
<code>DoubleArray</code>. If the underlying implementation is
array-based, this method should always return a copy, rather than a
reference to the underlying array so that changes made to the returned
array have no effect on the <code>DoubleArray.</code></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all elements added to the array</dd>
</dl>
</li>
</ul>
<a name="clear--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clear</h4>
<pre>void&nbsp;clear()</pre>
<div class="block">Clear the double array</div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../org/apache/openejb/math/util/MathUtils.html" title="class in org.apache.openejb.math.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/openejb/math/util/DoubleArray.html" target="_top">Frames</a></li>
<li><a href="DoubleArray.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>