Files
pj2/doc/edu/rit/util/BitSet32.html
2016-04-27 01:07:35 -04:00

791 lines
38 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>BitSet32 (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="BitSet32 (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/BitSet32.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/BitSet.html" title="class in edu.rit.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/util/BitSet64.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/BitSet32.html" target="_top">Frames</a></li>
<li><a href="BitSet32.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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">edu.rit.util</div>
<h2 title="Class BitSet32" class="title">Class BitSet32</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.BitSet32</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<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">BitSet32</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 BitSet32 provides a set of integers from 0 to 31. The set elements are
stored in a bitmap representation.
<P>
The bitmap representation is a value of type <TT>int</TT>. Bit 0 of the
bitmap (the least significant bit) corresponds to set element 0, bit 1 of the
bitmap (the next least significant bit) corresponds to set element 1, and so
on. A bit of the bitmap is 1 if the set contains the corresponding element; a
bit of the bitmap is 0 if the set does not contain the corresponding element.
<P>
<I>Note:</I> Class BitSet32 is not multiple thread safe.</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">&nbsp;</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/BitSet32.html#BitSet32()">BitSet32</a></strong>()</code>
<div class="block">Construct a new empty set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../edu/rit/util/BitSet32.html#BitSet32(edu.rit.util.BitSet32)">BitSet32</a></strong>(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</code>
<div class="block">Construct a new set that is a copy of the given set.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../edu/rit/util/BitSet32.html#BitSet32(int)">BitSet32</a></strong>(int&nbsp;bitmap)</code>
<div class="block">Construct a new set with the elements in the given bitmap.</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">&nbsp;</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/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#add(int)">add</a></strong>(int&nbsp;elem)</code>
<div class="block">Add the given element to this set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#add(int, int)">add</a></strong>(int&nbsp;lb,
int&nbsp;ub)</code>
<div class="block">Add all elements in the given range to this set.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#bitmap()">bitmap</a></strong>()</code>
<div class="block">Obtain this set's elements in the form of a bitmap.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#bitmap(int)">bitmap</a></strong>(int&nbsp;bitmap)</code>
<div class="block">Change this set's elements to be those in the given bitmap.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#clear()">clear</a></strong>()</code>
<div class="block">Clear this set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#contains(int)">contains</a></strong>(int&nbsp;elem)</code>
<div class="block">Determine if this set contains the given element.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#copy(edu.rit.util.BitSet32)">copy</a></strong>(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</code>
<div class="block">Change this set to be a copy of the given set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#difference(edu.rit.util.BitSet32)">difference</a></strong>(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</code>
<div class="block">Change this set to be the difference of itself and the given set.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#flip(int)">flip</a></strong>(int&nbsp;elem)</code>
<div class="block">Flip the given element.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#flip(int, int)">flip</a></strong>(int&nbsp;lb,
int&nbsp;ub)</code>
<div class="block">Flip all elements in the given range.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#forEachItemDo(edu.rit.util.IntAction)">forEachItemDo</a></strong>(<a href="../../../edu/rit/util/IntAction.html" title="interface in edu.rit.util">IntAction</a>&nbsp;action)</code>
<div class="block">Perform the given action on each element in this set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;R&gt;&nbsp;R</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#forEachItemDo(edu.rit.util.IntActionResult)">forEachItemDo</a></strong>(<a href="../../../edu/rit/util/IntActionResult.html" title="interface in edu.rit.util">IntActionResult</a>&lt;R&gt;&nbsp;action)</code>
<div class="block">Perform the given action on each element in this set and return a result.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#intersection(edu.rit.util.BitSet32)">intersection</a></strong>(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</code>
<div class="block">Change this set to be the intersection of itself and the given set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#isEmpty()">isEmpty</a></strong>()</code>
<div class="block">Determine if this set is empty.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#isSubsetOf(edu.rit.util.BitSet32)">isSubsetOf</a></strong>(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</code>
<div class="block">Determine if this set is a subset of the given set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#randomElement(edu.rit.util.Random)">randomElement</a></strong>(<a href="../../../edu/rit/util/Random.html" title="class in edu.rit.util">Random</a>&nbsp;prng)</code>
<div class="block">Return an element in this set chosen uniformly at random</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#readIn(edu.rit.io.InStream)">readIn</a></strong>(<a href="../../../edu/rit/io/InStream.html" title="class in edu.rit.io">InStream</a>&nbsp;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/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#remove(int)">remove</a></strong>(int&nbsp;elem)</code>
<div class="block">Remove the given element from this set.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#remove(int, int)">remove</a></strong>(int&nbsp;lb,
int&nbsp;ub)</code>
<div class="block">Remove all elements in the given range from this set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#removeEachItemIf(edu.rit.util.IntPredicate)">removeEachItemIf</a></strong>(<a href="../../../edu/rit/util/IntPredicate.html" title="interface in edu.rit.util">IntPredicate</a>&nbsp;predicate)</code>
<div class="block">Evaluate the given predicate on, and possibly remove, each element in
this set.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#size()">size</a></strong>()</code>
<div class="block">Returns the number of elements in this set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#symmetricDifference(edu.rit.util.BitSet32)">symmetricDifference</a></strong>(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</code>
<div class="block">Change this set to be the symmetric difference of itself and the given
set.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a></code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#union(edu.rit.util.BitSet32)">union</a></strong>(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</code>
<div class="block">Change this set to be the union of itself and the given set.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/util/BitSet32.html#writeOut(edu.rit.io.OutStream)">writeOut</a></strong>(<a href="../../../edu/rit/io/OutStream.html" title="class in edu.rit.io">OutStream</a>&nbsp;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&nbsp;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="BitSet32()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BitSet32</h4>
<pre>public&nbsp;BitSet32()</pre>
<div class="block">Construct a new empty set.</div>
</li>
</ul>
<a name="BitSet32(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>BitSet32</h4>
<pre>public&nbsp;BitSet32(int&nbsp;bitmap)</pre>
<div class="block">Construct a new set with the elements in the given bitmap.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bitmap</code> - Bitmap of set elements.</dd></dl>
</li>
</ul>
<a name="BitSet32(edu.rit.util.BitSet32)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>BitSet32</h4>
<pre>public&nbsp;BitSet32(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</pre>
<div class="block">Construct a new set that is a copy of the given set.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>set</code> - Set to copy.</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>set</TT> is null.</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&nbsp;boolean&nbsp;isEmpty()</pre>
<div class="block">Determine if this set is empty.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if this set is empty, false otherwise.</dd></dl>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;clear()</pre>
<div class="block">Clear this set.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="copy(edu.rit.util.BitSet32)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copy</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;copy(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</pre>
<div class="block">Change this set to be a copy of the given set.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>set</code> - Set to copy.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</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>set</TT> is null.</dd></dl>
</li>
</ul>
<a name="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;int&nbsp;size()</pre>
<div class="block">Returns the number of elements in this set.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of elements.</dd></dl>
</li>
</ul>
<a name="contains(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public&nbsp;boolean&nbsp;contains(int&nbsp;elem)</pre>
<div class="block">Determine if this set contains the given element. If <TT>elem</TT> is not
in the range 0 .. 31, false is returned.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>elem</code> - Element.</dd>
<dt><span class="strong">Returns:</span></dt><dd>True if this set contains <TT>elem</TT>, false otherwise.</dd></dl>
</li>
</ul>
<a name="add(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;add(int&nbsp;elem)</pre>
<div class="block">Add the given element to this set. If <TT>elem</TT> is not in the range 0
.. 31, this set is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>elem</code> - Element.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="add(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;add(int&nbsp;lb,
int&nbsp;ub)</pre>
<div class="block">Add all elements in the given range to this set. All elements from
<TT>lb</TT> through <TT>ub</TT>&minus;1, inclusive, are added to this
set. If any element is not in the range 0 .. 31, that element is not
added. If <TT>lb</TT> &ge; <TT>ub</TT>, this set is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lb</code> - Lower bound element (inclusive).</dd><dd><code>ub</code> - Upper bound element (exclusive).</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="remove(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;remove(int&nbsp;elem)</pre>
<div class="block">Remove the given element from this set. If <TT>elem</TT> is not in the
range 0 .. 31, this set is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>elem</code> - Element.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="remove(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;remove(int&nbsp;lb,
int&nbsp;ub)</pre>
<div class="block">Remove all elements in the given range from this set. All elements from
<TT>lb</TT> through <TT>ub</TT>&minus;1, inclusive, are removed from this
set. If any element is not in the range 0 .. 31, that element is not
removed. If <TT>lb</TT> &ge; <TT>ub</TT>, this set is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lb</code> - Lower bound element (inclusive).</dd><dd><code>ub</code> - Upper bound element (exclusive).</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="flip(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flip</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;flip(int&nbsp;elem)</pre>
<div class="block">Flip the given element. If this set contains <TT>elem</TT>, it is
removed; if this set does not contain <TT>elem</TT>, it is added. If
<TT>elem</TT> is not in the range 0 .. 31, this set is unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>elem</code> - Element.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="flip(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flip</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;flip(int&nbsp;lb,
int&nbsp;ub)</pre>
<div class="block">Flip all elements in the given range. All elements from <TT>lb</TT>
through <TT>ub</TT>&minus;1, inclusive, are flipped. If this set contains
such an element, it is removed; if this set does not contain such an
element, it is added. If any element is not in the range 0 .. 31, that
element is not flipped. If <TT>lb</TT> &ge; <TT>ub</TT>, this set is
unchanged.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>lb</code> - Lower bound element (inclusive).</dd><dd><code>ub</code> - Upper bound element (exclusive).</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="isSubsetOf(edu.rit.util.BitSet32)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSubsetOf</h4>
<pre>public&nbsp;boolean&nbsp;isSubsetOf(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</pre>
<div class="block">Determine if this set is a subset of the given set. This is so if every
element of this set is also an element of the given set.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>set</code> - Set.</dd>
<dt><span class="strong">Returns:</span></dt><dd>True if this set is a subset of the given set, false otherwise.</dd></dl>
</li>
</ul>
<a name="union(edu.rit.util.BitSet32)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>union</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;union(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</pre>
<div class="block">Change this set to be the union of itself and the given set. The union
consists of all elements that appear in this set or the given set or
both.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>set</code> - Set.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="intersection(edu.rit.util.BitSet32)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intersection</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;intersection(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</pre>
<div class="block">Change this set to be the intersection of itself and the given set. The
intersection consists of all elements that appear in this set and the
given set.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>set</code> - Set.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="difference(edu.rit.util.BitSet32)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>difference</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;difference(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</pre>
<div class="block">Change this set to be the difference of itself and the given set. The
difference consists of all elements that appear in this set and not in
the given set.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>set</code> - Set.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="symmetricDifference(edu.rit.util.BitSet32)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>symmetricDifference</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;symmetricDifference(<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;set)</pre>
<div class="block">Change this set to be the symmetric difference of itself and the given
set. The symmetric difference consists of all elements that appear in
this set or the given set, but not both.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>set</code> - Set.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="forEachItemDo(edu.rit.util.IntAction)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forEachItemDo</h4>
<pre>public&nbsp;void&nbsp;forEachItemDo(<a href="../../../edu/rit/util/IntAction.html" title="interface in edu.rit.util">IntAction</a>&nbsp;action)</pre>
<div class="block">Perform the given action on each element in this set. For each element in
this set from smallest to largest, the given <TT>action</TT>'s
<TT>run()</TT> method is called, passing in the element.
<P>
<B><I>Warning:</I></B> If the <TT>action</TT> adds elements to or removes
elements from the set, the <TT>forEachItemDo()</TT> method's behavior is
unspecified.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>action</code> - Action.</dd></dl>
</li>
</ul>
<a name="forEachItemDo(edu.rit.util.IntActionResult)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forEachItemDo</h4>
<pre>public&nbsp;&lt;R&gt;&nbsp;R&nbsp;forEachItemDo(<a href="../../../edu/rit/util/IntActionResult.html" title="interface in edu.rit.util">IntActionResult</a>&lt;R&gt;&nbsp;action)</pre>
<div class="block">Perform the given action on each element in this set and return a result.
For each element in this set from smallest to largest, the given
<TT>action</TT>'s <TT>run()</TT> method is called, passing in the
element. After all the elements have been processed, the given
<TT>action</TT>'s <TT>result()</TT> method is called, and its result is
returned.
<P>
<B><I>Warning:</I></B> If the <TT>action</TT> adds elements to or removes
elements from the set, the <TT>forEachItemDo()</TT> method's behavior is
unspecified.</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 set elements.</dd></dl>
</li>
</ul>
<a name="removeEachItemIf(edu.rit.util.IntPredicate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeEachItemIf</h4>
<pre>public&nbsp;void&nbsp;removeEachItemIf(<a href="../../../edu/rit/util/IntPredicate.html" title="interface in edu.rit.util">IntPredicate</a>&nbsp;predicate)</pre>
<div class="block">Evaluate the given predicate on, and possibly remove, each element in
this set. For each element in this set from smallest to largest, the
given <TT>predicate</TT>'s <TT>test()</TT> method is called, passing in
the element. If the <TT>test()</TT> method returns true, the element is
removed from this set.
<P>
<B><I>Warning:</I></B> If the <TT>predicate</TT> adds elements to or
removes elements from the set, 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="bitmap()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bitmap</h4>
<pre>public&nbsp;int&nbsp;bitmap()</pre>
<div class="block">Obtain this set's elements in the form of a bitmap.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Bitmap of set elements.</dd></dl>
</li>
</ul>
<a name="bitmap(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bitmap</h4>
<pre>public&nbsp;<a href="../../../edu/rit/util/BitSet32.html" title="class in edu.rit.util">BitSet32</a>&nbsp;bitmap(int&nbsp;bitmap)</pre>
<div class="block">Change this set's elements to be those in the given bitmap.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bitmap</code> - Bitmap of set elements.</dd>
<dt><span class="strong">Returns:</span></dt><dd>This set.</dd></dl>
</li>
</ul>
<a name="randomElement(edu.rit.util.Random)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>randomElement</h4>
<pre>public&nbsp;int&nbsp;randomElement(<a href="../../../edu/rit/util/Random.html" title="class in edu.rit.util">Random</a>&nbsp;prng)</pre>
<div class="block">Return an element in this set chosen uniformly at random</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>prng</code> - Pseudorandom number generator.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Random element, or &minus;1 if this set is empty.</dd></dl>
</li>
</ul>
<a name="writeOut(edu.rit.io.OutStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeOut</h4>
<pre>public&nbsp;void&nbsp;writeOut(<a href="../../../edu/rit/io/OutStream.html" title="class in edu.rit.io">OutStream</a>&nbsp;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.</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>&nbsp;in interface&nbsp;<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/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&nbsp;void&nbsp;readIn(<a href="../../../edu/rit/io/InStream.html" title="class in edu.rit.io">InStream</a>&nbsp;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.</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>&nbsp;in interface&nbsp;<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/BitSet32.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/BitSet.html" title="class in edu.rit.util"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/util/BitSet64.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/BitSet32.html" target="_top">Frames</a></li>
<li><a href="BitSet32.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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 &copy; 2013&ndash;2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">&#64;</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
</body>
</html>