source: objectmq/lib/rabbitmq-java-client-javadoc-3.0.1/com/rabbitmq/client/impl/SetQueue.html @ 3

Last change on this file since 3 was 3, checked in by stoda, 11 years ago
File size: 14.2 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_18) on Tue Dec 11 11:47:11 GMT 2012 -->
6<TITLE>
7SetQueue
8</TITLE>
9
10<META NAME="date" CONTENT="2012-12-11">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="SetQueue";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
47  </TR>
48</TABLE>
49</TD>
50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
51</EM>
52</TD>
53</TR>
54
55<TR>
56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57&nbsp;<A HREF="../../../../com/rabbitmq/client/impl/PlainMechanism.html" title="class in com.rabbitmq.client.impl"><B>PREV CLASS</B></A>&nbsp;
58&nbsp;<A HREF="../../../../com/rabbitmq/client/impl/ShutdownNotifierComponent.html" title="class in com.rabbitmq.client.impl"><B>NEXT CLASS</B></A></FONT></TD>
59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
60  <A HREF="../../../../index.html?com/rabbitmq/client/impl/SetQueue.html" target="_top"><B>FRAMES</B></A>  &nbsp;
61&nbsp;<A HREF="SetQueue.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
62&nbsp;<SCRIPT type="text/javascript">
63  <!--
64  if(window==top) {
65    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
66  }
67  //-->
68</SCRIPT>
69<NOSCRIPT>
70  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
71</NOSCRIPT>
72
73
74</FONT></TD>
75</TR>
76<TR>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
80DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
81</TR>
82</TABLE>
83<A NAME="skip-navbar_top"></A>
84<!-- ========= END OF TOP NAVBAR ========= -->
85
86<HR>
87<!-- ======== START OF CLASS DATA ======== -->
88<H2>
89<FONT SIZE="-1">
90com.rabbitmq.client.impl</FONT>
91<BR>
92Class SetQueue&lt;T&gt;</H2>
93<PRE>
94java.lang.Object
95  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.rabbitmq.client.impl.SetQueue&lt;T&gt;</B>
96</PRE>
97<DL>
98<DT><DT><B>Type Parameters:</B><DD><CODE>T</CODE> - type of elements in the queue</DL>
99<HR>
100<DL>
101<DT><PRE>public class <B>SetQueue&lt;T&gt;</B><DT>extends java.lang.Object</DL>
102</PRE>
103
104<P>
105A generic queue-like implementation (supporting operations <code>addIfNotPresent</code>,
106 <code>poll</code>, <code>contains</code>, and <code>isEmpty</code>)
107 which restricts a queue element to appear at most once.
108 If the element is already present <A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#addIfNotPresent(T)"><CODE>addIfNotPresent(T)</CODE></A> returns <code><b>false</b></code>.
109 <p/>
110 Elements must not be <code><b>null</b></code>.
111 <p/><b>Concurrent Semantics</b><br/>
112 This implementation is <i>not</i> thread-safe.
113<P>
114
115<P>
116<HR>
117
118<P>
119
120<!-- ======== CONSTRUCTOR SUMMARY ======== -->
121
122<A NAME="constructor_summary"><!-- --></A>
123<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
124<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
125<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
126<B>Constructor Summary</B></FONT></TH>
127</TR>
128<TR BGCOLOR="white" CLASS="TableRowColor">
129<TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#SetQueue()">SetQueue</A></B>()</CODE>
130
131<BR>
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
133</TR>
134</TABLE>
135&nbsp;
136<!-- ========== METHOD SUMMARY =========== -->
137
138<A NAME="method_summary"><!-- --></A>
139<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
140<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
141<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
142<B>Method Summary</B></FONT></TH>
143</TR>
144<TR BGCOLOR="white" CLASS="TableRowColor">
145<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
146<CODE>&nbsp;boolean</CODE></FONT></TD>
147<TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#addIfNotPresent(T)">addIfNotPresent</A></B>(<A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A>&nbsp;item)</CODE>
148
149<BR>
150&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add an element to the back of the queue and return <code><b>true</b></code>, or else return <code><b>false</b></code>.</TD>
151</TR>
152<TR BGCOLOR="white" CLASS="TableRowColor">
153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154<CODE>&nbsp;void</CODE></FONT></TD>
155<TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#clear()">clear</A></B>()</CODE>
156
157<BR>
158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove all items from the queue.</TD>
159</TR>
160<TR BGCOLOR="white" CLASS="TableRowColor">
161<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
162<CODE>&nbsp;boolean</CODE></FONT></TD>
163<TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#contains(T)">contains</A></B>(<A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A>&nbsp;item)</CODE>
164
165<BR>
166&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
167</TR>
168<TR BGCOLOR="white" CLASS="TableRowColor">
169<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
170<CODE>&nbsp;boolean</CODE></FONT></TD>
171<TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#isEmpty()">isEmpty</A></B>()</CODE>
172
173<BR>
174&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
175</TR>
176<TR BGCOLOR="white" CLASS="TableRowColor">
177<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
178<CODE>&nbsp;<A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A></CODE></FONT></TD>
179<TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#poll()">poll</A></B>()</CODE>
180
181<BR>
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove the head of the queue and return it.</TD>
183</TR>
184<TR BGCOLOR="white" CLASS="TableRowColor">
185<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
186<CODE>&nbsp;boolean</CODE></FONT></TD>
187<TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html#remove(T)">remove</A></B>(<A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A>&nbsp;item)</CODE>
188
189<BR>
190&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove item from queue, if present.</TD>
191</TR>
192</TABLE>
193&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
194<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
195<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
196<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
197</TR>
198<TR BGCOLOR="white" CLASS="TableRowColor">
199<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
200</TR>
201</TABLE>
202&nbsp;
203<P>
204
205<!-- ========= CONSTRUCTOR DETAIL ======== -->
206
207<A NAME="constructor_detail"><!-- --></A>
208<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
209<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
210<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
211<B>Constructor Detail</B></FONT></TH>
212</TR>
213</TABLE>
214
215<A NAME="SetQueue()"><!-- --></A><H3>
216SetQueue</H3>
217<PRE>
218public <B>SetQueue</B>()</PRE>
219<DL>
220</DL>
221
222<!-- ============ METHOD DETAIL ========== -->
223
224<A NAME="method_detail"><!-- --></A>
225<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
226<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
227<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
228<B>Method Detail</B></FONT></TH>
229</TR>
230</TABLE>
231
232<A NAME="addIfNotPresent(java.lang.Object)"><!-- --></A><A NAME="addIfNotPresent(T)"><!-- --></A><H3>
233addIfNotPresent</H3>
234<PRE>
235public boolean <B>addIfNotPresent</B>(<A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A>&nbsp;item)</PRE>
236<DL>
237<DD>Add an element to the back of the queue and return <code><b>true</b></code>, or else return <code><b>false</b></code>.
238<P>
239<DD><DL>
240<DT><B>Parameters:</B><DD><CODE>item</CODE> - to add
241<DT><B>Returns:</B><DD><b><code>true</code></b> if the element was added, <b><code>false</code></b> if it is already present.</DL>
242</DD>
243</DL>
244<HR>
245
246<A NAME="poll()"><!-- --></A><H3>
247poll</H3>
248<PRE>
249public <A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A> <B>poll</B>()</PRE>
250<DL>
251<DD>Remove the head of the queue and return it.
252<P>
253<DD><DL>
254
255<DT><B>Returns:</B><DD>head element of the queue, or <b><code>null</code></b> if the queue is empty.</DL>
256</DD>
257</DL>
258<HR>
259
260<A NAME="contains(java.lang.Object)"><!-- --></A><A NAME="contains(T)"><!-- --></A><H3>
261contains</H3>
262<PRE>
263public boolean <B>contains</B>(<A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A>&nbsp;item)</PRE>
264<DL>
265<DD><DL>
266<DT><B>Parameters:</B><DD><CODE>item</CODE> - to look for in queue
267<DT><B>Returns:</B><DD><code><b>true</b></code> if and only if <b>item</b> is in the queue.</DL>
268</DD>
269</DL>
270<HR>
271
272<A NAME="isEmpty()"><!-- --></A><H3>
273isEmpty</H3>
274<PRE>
275public boolean <B>isEmpty</B>()</PRE>
276<DL>
277<DD><DL>
278
279<DT><B>Returns:</B><DD><code><b>true</b></code> if and only if the queue is empty.</DL>
280</DD>
281</DL>
282<HR>
283
284<A NAME="remove(java.lang.Object)"><!-- --></A><A NAME="remove(T)"><!-- --></A><H3>
285remove</H3>
286<PRE>
287public boolean <B>remove</B>(<A HREF="../../../../com/rabbitmq/client/impl/SetQueue.html" title="type parameter in SetQueue">T</A>&nbsp;item)</PRE>
288<DL>
289<DD>Remove item from queue, if present.
290<P>
291<DD><DL>
292<DT><B>Parameters:</B><DD><CODE>item</CODE> - to remove
293<DT><B>Returns:</B><DD><code><b>true</b></code> if and only if item was initially present and was removed.</DL>
294</DD>
295</DL>
296<HR>
297
298<A NAME="clear()"><!-- --></A><H3>
299clear</H3>
300<PRE>
301public void <B>clear</B>()</PRE>
302<DL>
303<DD>Remove all items from the queue.
304<P>
305<DD><DL>
306</DL>
307</DD>
308</DL>
309<!-- ========= END OF CLASS DATA ========= -->
310<HR>
311
312
313<!-- ======= START OF BOTTOM NAVBAR ====== -->
314<A NAME="navbar_bottom"><!-- --></A>
315<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
316<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
317<TR>
318<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
319<A NAME="navbar_bottom_firstrow"><!-- --></A>
320<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
321  <TR ALIGN="center" VALIGN="top">
322  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
323  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
324  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
325  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
326  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
327  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
328  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
329  </TR>
330</TABLE>
331</TD>
332<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
333</EM>
334</TD>
335</TR>
336
337<TR>
338<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
339&nbsp;<A HREF="../../../../com/rabbitmq/client/impl/PlainMechanism.html" title="class in com.rabbitmq.client.impl"><B>PREV CLASS</B></A>&nbsp;
340&nbsp;<A HREF="../../../../com/rabbitmq/client/impl/ShutdownNotifierComponent.html" title="class in com.rabbitmq.client.impl"><B>NEXT CLASS</B></A></FONT></TD>
341<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
342  <A HREF="../../../../index.html?com/rabbitmq/client/impl/SetQueue.html" target="_top"><B>FRAMES</B></A>  &nbsp;
343&nbsp;<A HREF="SetQueue.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
344&nbsp;<SCRIPT type="text/javascript">
345  <!--
346  if(window==top) {
347    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
348  }
349  //-->
350</SCRIPT>
351<NOSCRIPT>
352  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
353</NOSCRIPT>
354
355
356</FONT></TD>
357</TR>
358<TR>
359<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
360  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
361<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
362DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
363</TR>
364</TABLE>
365<A NAME="skip-navbar_bottom"></A>
366<!-- ======== END OF BOTTOM NAVBAR ======= -->
367
368<HR>
369
370</BODY>
371</HTML>
Note: See TracBrowser for help on using the repository browser.