888 lines
45 KiB
HTML
888 lines
45 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (version 1.7.0_51) on Wed Apr 06 13:11:11 EDT 2016 -->
|
|
<title>AList (Parallel Java 2 Library Documentation)</title>
|
|
<meta name="date" content="2016-04-06">
|
|
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="AList (Parallel Java 2 Library Documentation)";
|
|
}
|
|
//-->
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar_top">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="class-use/AList.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../edu/rit/util/ActionResult.html" title="interface in edu.rit.util"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/util/BitSet.html" title="class in edu.rit.util"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/util/AList.html" target="_top">Frames</a></li>
|
|
<li><a href="AList.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses-noframe.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </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">edu.rit.util</div>
|
|
<h2 title="Class AList" class="title">Class AList<T></h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>edu.rit.util.AList<T></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - List item data type.</dd></dl>
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><a href="../../../edu/rit/io/Streamable.html" title="interface in edu.rit.io">Streamable</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="strong">AList<T></span>
|
|
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
|
|
implements <a href="../../../edu/rit/io/Streamable.html" title="interface in edu.rit.io">Streamable</a></pre>
|
|
<div class="block">Class AList provides a list of items stored in a dynamically-sized array.
|
|
<P>
|
|
Operations take constant time unless otherwise specified. <I>n</I> is the
|
|
number of items stored in the list.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../edu/rit/util/AList.html#AList()">AList</a></strong>()</code>
|
|
<div class="block">Construct a new list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><strong><a href="../../../edu/rit/util/AList.html#AList(edu.rit.util.AList)">AList</a></strong>(<a href="../../../edu/rit/util/AList.html" title="class in edu.rit.util">AList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</code>
|
|
<div class="block">Construct a new list that is a copy of the given list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><strong><a href="../../../edu/rit/util/AList.html#AList(edu.rit.util.DList)">AList</a></strong>(<a href="../../../edu/rit/util/DList.html" title="class in edu.rit.util">DList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</code>
|
|
<div class="block">Construct a new list that is a copy of the given list.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#add(int, T)">add</a></strong>(int p,
|
|
<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</code>
|
|
<div class="block">Add the given item to this list at the given position.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#addFirst(T)">addFirst</a></strong>(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</code>
|
|
<div class="block">Add the given item to the beginning of this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#addLast(T)">addLast</a></strong>(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</code>
|
|
<div class="block">Add the given item to the end of this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#clear()">clear</a></strong>()</code>
|
|
<div class="block">Clear this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#contains(edu.rit.util.Predicate)">contains</a></strong>(<a href="../../../edu/rit/util/Predicate.html" title="interface in edu.rit.util">Predicate</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> predicate)</code>
|
|
<div class="block">Determine if this list contains an item for which the given predicate is
|
|
true.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#contains(T)">contains</a></strong>(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> item)</code>
|
|
<div class="block">Determine if this list that contains the given item.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#copy(edu.rit.util.AList)">copy</a></strong>(<a href="../../../edu/rit/util/AList.html" title="class in edu.rit.util">AList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</code>
|
|
<div class="block">Set this list to a copy of the given list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#copy(edu.rit.util.DList)">copy</a></strong>(<a href="../../../edu/rit/util/DList.html" title="class in edu.rit.util">DList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</code>
|
|
<div class="block">Set this list to a copy of the given list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#forEachItemDo(edu.rit.util.Action)">forEachItemDo</a></strong>(<a href="../../../edu/rit/util/Action.html" title="interface in edu.rit.util">Action</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> action)</code>
|
|
<div class="block">Perform the given action on each item in this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><R> R</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#forEachItemDo(edu.rit.util.ActionResult)">forEachItemDo</a></strong>(<a href="../../../edu/rit/util/ActionResult.html" title="interface in edu.rit.util">ActionResult</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>,R> action)</code>
|
|
<div class="block">Perform the given action on each item in this list and return a result.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#get(int)">get</a></strong>(int p)</code>
|
|
<div class="block">Get the item at the given position in this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#isEmpty()">isEmpty</a></strong>()</code>
|
|
<div class="block">Determine if this list is empty.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#position(edu.rit.util.Predicate)">position</a></strong>(<a href="../../../edu/rit/util/Predicate.html" title="interface in edu.rit.util">Predicate</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> predicate)</code>
|
|
<div class="block">Get the position of the first item in this list for which the given
|
|
predicate is true.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#position(T)">position</a></strong>(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</code>
|
|
<div class="block">Get the position of the given item in this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#readIn(edu.rit.io.InStream)">readIn</a></strong>(<a href="../../../edu/rit/io/InStream.html" title="class in edu.rit.io">InStream</a> in)</code>
|
|
<div class="block">Read this object's fields from the given in stream.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#remove(int)">remove</a></strong>(int p)</code>
|
|
<div class="block">Remove the item at the given position in this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#removeEachItemIf(edu.rit.util.Predicate)">removeEachItemIf</a></strong>(<a href="../../../edu/rit/util/Predicate.html" title="interface in edu.rit.util">Predicate</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> predicate)</code>
|
|
<div class="block">Evaluate the given predicate on, and possibly remove, each item in this
|
|
list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#removeFirst()">removeFirst</a></strong>()</code>
|
|
<div class="block">Remove the item at the beginning of this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#removeLast()">removeLast</a></strong>()</code>
|
|
<div class="block">Remove the item at the end of this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#set(int, T)">set</a></strong>(int p,
|
|
<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</code>
|
|
<div class="block">Set the item at the given position in this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#size()">size</a></strong>()</code>
|
|
<div class="block">Returns the number of items in this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#swap(int, int)">swap</a></strong>(int p,
|
|
int q)</code>
|
|
<div class="block">Swap the items at the given positions in this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a></code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#swapRemoveLast(int)">swapRemoveLast</a></strong>(int p)</code>
|
|
<div class="block">Swap the item at the given position with the item at the end of this
|
|
list, then remove the item at the end of this list.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[]</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#toArray(T[])">toArray</a></strong>(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[] array)</code>
|
|
<div class="block">Store this list's items in the given array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[]</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#toArray(T[], int, int)">toArray</a></strong>(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[] array,
|
|
int off,
|
|
int len)</code>
|
|
<div class="block">Store this list's items in the given array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/util/AList.html#writeOut(edu.rit.io.OutStream)">writeOut</a></strong>(<a href="../../../edu/rit/io/OutStream.html" title="class in edu.rit.io">OutStream</a> out)</code>
|
|
<div class="block">Write this object's fields to the given out stream.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
|
|
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="AList()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>AList</h4>
|
|
<pre>public AList()</pre>
|
|
<div class="block">Construct a new list.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="AList(edu.rit.util.AList)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>AList</h4>
|
|
<pre>public AList(<a href="../../../edu/rit/util/AList.html" title="class in edu.rit.util">AList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</pre>
|
|
<div class="block">Construct a new list that is a copy of the given list. The new list's
|
|
entries contain the same items in the same order as the given list. Time:
|
|
<I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - List to copy.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="AList(edu.rit.util.DList)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>AList</h4>
|
|
<pre>public AList(<a href="../../../edu/rit/util/DList.html" title="class in edu.rit.util">DList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</pre>
|
|
<div class="block">Construct a new list that is a copy of the given list. The new list's
|
|
entries contain the same items in the same order as the given list. Time:
|
|
<I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - List to copy.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="isEmpty()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>isEmpty</h4>
|
|
<pre>public boolean isEmpty()</pre>
|
|
<div class="block">Determine if this list is empty.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>True if this list is empty, false if it isn't.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="clear()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>clear</h4>
|
|
<pre>public void clear()</pre>
|
|
<div class="block">Clear this list. Time: <I>O</I>(<I>n</I>).</div>
|
|
</li>
|
|
</ul>
|
|
<a name="copy(edu.rit.util.AList)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>copy</h4>
|
|
<pre>public void copy(<a href="../../../edu/rit/util/AList.html" title="class in edu.rit.util">AList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</pre>
|
|
<div class="block">Set this list to a copy of the given list. Afterwards, this list's
|
|
entries contain the same items in the same order as the given list. Time:
|
|
<I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - List to copy.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="copy(edu.rit.util.DList)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>copy</h4>
|
|
<pre>public void copy(<a href="../../../edu/rit/util/DList.html" title="class in edu.rit.util">DList</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> list)</pre>
|
|
<div class="block">Set this list to a copy of the given list. Afterwards, this list's
|
|
entries contain the same items in the same order as the given list. Time:
|
|
<I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - List to copy.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="size()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>size</h4>
|
|
<pre>public int size()</pre>
|
|
<div class="block">Returns the number of items in this list.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of items.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> get(int p)</pre>
|
|
<div class="block">Get the item at the given position in this list.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Position, in the range 0 .. <TT>size()</TT>−1.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Item stored at position <TT>p</TT>.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>p</TT> is out of bounds.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="set(int,java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="set(int, T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>set</h4>
|
|
<pre>public void set(int p,
|
|
<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</pre>
|
|
<div class="block">Set the item at the given position in this list.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Position, in the range 0 .. <TT>size()</TT>−1.</dd><dd><code>i</code> - Item to store at position <TT>p</TT>.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>p</TT> is out of bounds.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="swap(int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>swap</h4>
|
|
<pre>public void swap(int p,
|
|
int q)</pre>
|
|
<div class="block">Swap the items at the given positions in this list.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - First item position, in the range 0 ..
|
|
<TT>size()</TT>−1.</dd><dd><code>q</code> - Second item position, in the range 0 ..
|
|
<TT>size()</TT>−1.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>p</TT> or <TT>q</TT> is out of
|
|
bounds.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="position(java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="position(T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>position</h4>
|
|
<pre>public int position(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</pre>
|
|
<div class="block">Get the position of the given item in this list. This involves a linear
|
|
scan of the list items starting from the beginning of the list; the
|
|
returned value is the position of the first item encountered that is
|
|
equal to the given item, as determined by the item's <TT>equals()</TT>
|
|
method; if there is no such item, −1 is returned. Time:
|
|
<I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - Item.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Position of matching item in the range 0 ..
|
|
<TT>size()</TT>−1, or −1 if none.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="position(edu.rit.util.Predicate)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>position</h4>
|
|
<pre>public int position(<a href="../../../edu/rit/util/Predicate.html" title="interface in edu.rit.util">Predicate</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> predicate)</pre>
|
|
<div class="block">Get the position of the first item in this list for which the given
|
|
predicate is true. This involves a linear scan of the list items starting
|
|
from the beginning of the list; the returned value is the position of the
|
|
first item encountered for which the predicate's <TT>test()</TT> method
|
|
returns true; if there is no such item, −1 is returned. Time:
|
|
<I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>predicate</code> - Predicate.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Position of matching item in the range 0 ..
|
|
<TT>size()</TT>−1, or −1 if none.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="contains(java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="contains(T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>contains</h4>
|
|
<pre>public boolean contains(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> item)</pre>
|
|
<div class="block">Determine if this list that contains the given item. This involves a
|
|
linear scan of the list entries from beginning to end; if an entry is
|
|
encountered whose item is equal to the given item, as determined by the
|
|
item's <TT>equals()</TT> method, true is returned; otherwise false is
|
|
returned. Time: <I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>item</code> - Item.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>True if this list contains <TT>item</TT>, false otherwise.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="contains(edu.rit.util.Predicate)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>contains</h4>
|
|
<pre>public boolean contains(<a href="../../../edu/rit/util/Predicate.html" title="interface in edu.rit.util">Predicate</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> predicate)</pre>
|
|
<div class="block">Determine if this list contains an item for which the given predicate is
|
|
true. This involves a linear scan of the list entries from beginning to
|
|
end; if an entry is encountered for which the predicate's <TT>test()</TT>
|
|
method returns true, true is returned; otherwise false is returned. Time:
|
|
<I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>predicate</code> - Predicate.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>True if this list contains an item matching <TT>predicate</TT>,
|
|
false otherwise.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addLast(java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="addLast(T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addLast</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> addLast(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</pre>
|
|
<div class="block">Add the given item to the end of this list. This list's size increases by
|
|
1.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - Item.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Newly added item.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="addFirst(java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="addFirst(T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>addFirst</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> addFirst(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</pre>
|
|
<div class="block">Add the given item to the beginning of this list. Items at position 0 and
|
|
beyond are moved forward one position. This list's size increases by 1.
|
|
Time: <I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - Item.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Newly added item.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="add(int,java.lang.Object)">
|
|
<!-- -->
|
|
</a><a name="add(int, T)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>add</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> add(int p,
|
|
<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> i)</pre>
|
|
<div class="block">Add the given item to this list at the given position. Items at position
|
|
<TT>p</TT> and beyond are moved forward one position. This list's size
|
|
increases by 1. Time: <I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Position, in the range 0 .. <TT>size()</TT>.</dd><dd><code>i</code> - Item.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Newly added item.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>p</TT> is out of bounds.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeLast()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeLast</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> removeLast()</pre>
|
|
<div class="block">Remove the item at the end of this list. The removed item is returned.
|
|
This list's size decreases by 1. If this list is empty, nothing happens
|
|
and null is returned.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>Removed item, or null if this list is empty.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeFirst()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeFirst</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> removeFirst()</pre>
|
|
<div class="block">Remove the item at the beginning of this list. Items at position 1 and
|
|
beyond are moved backward one position. The removed item is returned.
|
|
This list's size decreases by 1. If this list is empty, nothing happens
|
|
and null is returned. Time: <I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>Removed item, or null if this list is empty.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="remove(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>remove</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> remove(int p)</pre>
|
|
<div class="block">Remove the item at the given position in this list. Items at position
|
|
<TT>p</TT>+1 and beyond are moved backward one position. The removed item
|
|
is returned. This list's size decreases by 1. If this list is empty,
|
|
nothing happens and null is returned. Time: <I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Position, in the range 0 .. <TT>size()</TT>−1.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Removed item, or null if this list is empty.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if this list is not empty and <TT>p</TT>
|
|
is out of bounds.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="swapRemoveLast(int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>swapRemoveLast</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a> swapRemoveLast(int p)</pre>
|
|
<div class="block">Swap the item at the given position with the item at the end of this
|
|
list, then remove the item at the end of this list. The removed item,
|
|
which used to be at the given position, is returned. This list's size
|
|
decreases by 1.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>p</code> - Position, in the range 0 .. <TT>size()</TT>−1.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Removed item.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>p</TT> is out of bounds.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="forEachItemDo(edu.rit.util.Action)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>forEachItemDo</h4>
|
|
<pre>public void forEachItemDo(<a href="../../../edu/rit/util/Action.html" title="interface in edu.rit.util">Action</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> action)</pre>
|
|
<div class="block">Perform the given action on each item in this list. For each item in this
|
|
list from beginning to end, the given <TT>action</TT>'s <TT>run()</TT>
|
|
method is called, passing in the item. Time: <I>O</I>(<I>n</I>).
|
|
<P>
|
|
<B><I>Warning:</I></B> If the <TT>action</TT> adds items to or removes
|
|
items from the list, the <TT>forEachItemDo()</TT> method's behavior is
|
|
not specified.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>action</code> - Action.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="forEachItemDo(edu.rit.util.ActionResult)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>forEachItemDo</h4>
|
|
<pre>public <R> R forEachItemDo(<a href="../../../edu/rit/util/ActionResult.html" title="interface in edu.rit.util">ActionResult</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>,R> action)</pre>
|
|
<div class="block">Perform the given action on each item in this list and return a result.
|
|
For each item in this list from beginning to end, the given
|
|
<TT>action</TT>'s <TT>run()</TT> method is called, passing in the item.
|
|
After all the list items have been processed, the given <TT>action</TT>'s
|
|
<TT>result()</TT> method is called, and its result is returned. Time:
|
|
<I>O</I>(<I>n</I>).
|
|
<P>
|
|
<B><I>Warning:</I></B> If the <TT>action</TT> adds items to or removes
|
|
items from the list, the <TT>forEachItemDo()</TT> method's behavior is
|
|
not specified.</div>
|
|
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>R</code> - Result data type.</dd><dt><span class="strong">Parameters:</span></dt><dd><code>action</code> - Action.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>Result of processing all the list items.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="removeEachItemIf(edu.rit.util.Predicate)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>removeEachItemIf</h4>
|
|
<pre>public void removeEachItemIf(<a href="../../../edu/rit/util/Predicate.html" title="interface in edu.rit.util">Predicate</a><<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>> predicate)</pre>
|
|
<div class="block">Evaluate the given predicate on, and possibly remove, each item in this
|
|
list. For each item in this list from beginning to end, the given
|
|
<TT>predicate</TT>'s <TT>test()</TT> method is called, passing in the
|
|
item. If the <TT>test()</TT> method returns true, the item is removed
|
|
from this list. Time: <I>O</I>(<I>n</I>).
|
|
<P>
|
|
<B><I>Warning:</I></B> If the <TT>predicate</TT> adds items to or removes
|
|
items from the list, other than by returning true, the
|
|
<TT>removeEachItemIf()</TT> method's behavior is not specified.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>predicate</code> - Predicate.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="toArray(java.lang.Object[])">
|
|
<!-- -->
|
|
</a><a name="toArray(T[])">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toArray</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[] toArray(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[] array)</pre>
|
|
<div class="block">Store this list's items in the given array. The first item is stored at
|
|
index 0, the second item at index 1, and so on. The number of array
|
|
elements set is <TT>array.length</TT>. If this list contains fewer than
|
|
<TT>array.length</TT> items, the remaining array elements are set to
|
|
null. Time: <I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>array</code> - Array in which to store items.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The given array is returned.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>array</TT> is null.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="toArray(java.lang.Object[],int,int)">
|
|
<!-- -->
|
|
</a><a name="toArray(T[], int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>toArray</h4>
|
|
<pre>public <a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[] toArray(<a href="../../../edu/rit/util/AList.html" title="type parameter in AList">T</a>[] array,
|
|
int off,
|
|
int len)</pre>
|
|
<div class="block">Store this list's items in the given array. The first item is stored at
|
|
index <TT>off</TT>, the second item at index <TT>off</TT>+1, and so on.
|
|
The number of array elements set is <TT>len</TT>. If this list contains
|
|
fewer than <TT>len</TT> items, the remaining array elements are set to
|
|
null. Time: <I>O</I>(<I>n</I>).</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>array</code> - Array in which to store items.</dd><dd><code>off</code> - Index at which to store first item.</dd><dd><code>len</code> - Number of items to store.</dd>
|
|
<dt><span class="strong">Returns:</span></dt><dd>The given array is returned.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>array</TT> is null.</dd>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>off</TT> < 0, <TT>len</TT>
|
|
< 0, or <TT>off</TT>+<TT>len</TT> > <TT>array.length</TT>.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="writeOut(edu.rit.io.OutStream)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>writeOut</h4>
|
|
<pre>public void writeOut(<a href="../../../edu/rit/io/OutStream.html" title="class in edu.rit.io">OutStream</a> out)
|
|
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
|
|
<div class="block">Write this object's fields to the given out stream. The list items are
|
|
written using <a href="../../../edu/rit/io/OutStream.html#writeReference(java.lang.Object)"><code>writeReference()</code></a>.</div>
|
|
<dl>
|
|
<dt><strong>Specified by:</strong></dt>
|
|
<dd><code><a href="../../../edu/rit/io/Streamable.html#writeOut(edu.rit.io.OutStream)">writeOut</a></code> in interface <code><a href="../../../edu/rit/io/Streamable.html" title="interface in edu.rit.io">Streamable</a></code></dd>
|
|
<dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - Out stream.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - (unchecked exception) Thrown if an item in this list is not
|
|
streamable.</dd>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - Thrown if an I/O error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="readIn(edu.rit.io.InStream)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>readIn</h4>
|
|
<pre>public void readIn(<a href="../../../edu/rit/io/InStream.html" title="class in edu.rit.io">InStream</a> in)
|
|
throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
|
|
<div class="block">Read this object's fields from the given in stream. The list items are
|
|
read using <a href="../../../edu/rit/io/InStream.html#readReference()"><code>readReference()</code></a>.</div>
|
|
<dl>
|
|
<dt><strong>Specified by:</strong></dt>
|
|
<dd><code><a href="../../../edu/rit/io/Streamable.html#readIn(edu.rit.io.InStream)">readIn</a></code> in interface <code><a href="../../../edu/rit/io/Streamable.html" title="interface in edu.rit.io">Streamable</a></code></dd>
|
|
<dt><span class="strong">Parameters:</span></dt><dd><code>in</code> - In stream.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - Thrown if an I/O error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar_bottom">
|
|
<!-- -->
|
|
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/AList.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../index-files/index-1.html">Index</a></li>
|
|
<li><a href="../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../edu/rit/util/ActionResult.html" title="interface in edu.rit.util"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/util/BitSet.html" title="class in edu.rit.util"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/util/AList.html" target="_top">Frames</a></li>
|
|
<li><a href="AList.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses-noframe.html">All 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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_summary">Constr</a> | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor_detail">Constr</a> | </li>
|
|
<li><a href="#method_detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip-navbar_bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small><FONT SIZE="-2">Copyright © 2013–2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">@</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
|
|
</body>
|
|
</html>
|