📄 datastructures.queuear.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Sun Sep 27 09:53:40 EDT 1998
-->
<title>
Class DataStructures.QueueAr
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-DataStructures.html">This Package</a> <a href="DataStructures.QuadraticProbingHashTable.html">Previous</a> <a href="DataStructures.Random.html">Next</a> <a href="Index.html">Index</a> </pre>
<hr>
<h1>
Class DataStructures.QueueAr
</h1>
<pre>
java.lang.Object
|
+----DataStructures.QueueAr
</pre>
<hr>
<dl>
<dt>public class <b>QueueAr</b>
<dt>extends Object</dl>
Array-based implementation of the queue.
<p>
<hr>
<a name="index"></a><h2>
<img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
<dt><img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#QueueAr()"><b>QueueAr</b></a>()
<dd>Construct the queue.
<dt><img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#QueueAr(int)"><b>QueueAr</b></a>(int)
<dd>Construct the queue.
</dl>
<h2>
<img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
<dt><img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#dequeue()"><b>dequeue</b></a>()
<dd>Return and remove the least recently inserted item from the queue.
<dt><img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#enqueue(java.lang.Object)"><b>enqueue</b></a>(Object)
<dd>Insert a new item into the queue.
<dt><img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#getFront()"><b>getFront</b></a>()
<dd>Get the least recently inserted item in the queue.
<dt><img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#isEmpty()"><b>isEmpty</b></a>()
<dd>Test if the queue is logically empty.
<dt><img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#isFull()"><b>isFull</b></a>()
<dd>Test if the queue is logically full.
<dt><img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#main(java.lang.String[])"><b>main</b></a>(String[])
<dd>
<dt><img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#makeEmpty()"><b>makeEmpty</b></a>()
<dd>Make the queue logically empty.
</dl>
<a name="constructors"></a><h2>
<img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="QueueAr"></a><a name="QueueAr"></a><a name="QueueAr()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o ">
</a><b>QueueAr</b>
<pre>
public QueueAr()</pre>
<dl>
<dd>Construct the queue.
<p>
</dl>
<a name="QueueAr"></a><a name="QueueAr(int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o ">
</a><b>QueueAr</b>
<pre>
public QueueAr(int capacity)</pre>
<dl>
<dd>Construct the queue.
<p>
</dl>
<a name="methods"></a><h2>
<img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="isEmpty"></a><a name="isEmpty()"><img src="images/red-ball.gif" width=12 height=12 alt=" o ">
</a><b>isEmpty</b>
<pre>
public boolean isEmpty()</pre>
<dl>
<dd>Test if the queue is logically empty.
<p>
<dd><dl>
<dt><b>Returns:</b>
<dd>true if empty, false otherwise.</dl>
</dd>
</dl>
<a name="isFull"></a><a name="isFull()"><img src="images/red-ball.gif" width=12 height=12 alt=" o ">
</a><b>isFull</b>
<pre>
public boolean isFull()</pre>
<dl>
<dd>Test if the queue is logically full.
<p>
<dd><dl>
<dt><b>Returns:</b>
<dd>true if full, false otherwise.</dl>
</dd>
</dl>
<a name="makeEmpty"></a><a name="makeEmpty()"><img src="images/red-ball.gif" width=12 height=12 alt=" o ">
</a><b>makeEmpty</b>
<pre>
public void makeEmpty()</pre>
<dl>
<dd>Make the queue logically empty.
<p>
</dl>
<a name="getFront"></a><a name="getFront()"><img src="images/red-ball.gif" width=12 height=12 alt=" o ">
</a><b>getFront</b>
<pre>
public Object getFront()</pre>
<dl>
<dd>Get the least recently inserted item in the queue.Does not alter the queue.
<p>
<dd><dl>
<dt><b>Returns:</b>
<dd>the least recently inserted item in the queue, or null, if empty.</dl>
</dd>
</dl>
<a name="dequeue"></a><a name="dequeue()"><img src="images/red-ball.gif" width=12 height=12 alt=" o ">
</a><b>dequeue</b>
<pre>
public Object dequeue()</pre>
<dl>
<dd>Return and remove the least recently inserted item from the queue.
<p>
<dd><dl>
<dt><b>Returns:</b>
<dd>the least recently inserted item in the queue, or null, if empty.</dl>
</dd>
</dl>
<a name="enqueue"></a><a name="enqueue(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o ">
</a><b>enqueue</b>
<pre>
public void enqueue(Object x) throws <a href="DataStructures.Overflow.html">Overflow</a></pre>
<dl>
<dd>Insert a new item into the queue.
<p>
<dd><dl>
<dt><b>Parameters:</b>
<dd>x - the item to insert.
<dt><b>Throws:</b>
<a href="DataStructures.Overflow.html">Overflow</a><dd>if queue is full.</dl>
</dd>
</dl>
<a name="main"></a><a name="main(java.lang.String[])"><img src="images/green-ball.gif" width=12 height=12 alt=" o ">
</a><b>main</b>
<pre>
public static void main(String[] args)</pre>
<dl>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-DataStructures.html">This Package</a> <a href="DataStructures.QuadraticProbingHashTable.html">Previous</a> <a href="DataStructures.Random.html">Next</a> <a href="Index.html">Index</a> </pre>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -