-
Notifications
You must be signed in to change notification settings - Fork 0
/
IQueue.xml
408 lines (407 loc) · 24.8 KB
/
IQueue.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
<Type Name="IQueue" FullName="Java.Util.IQueue">
<TypeSignature Language="C#" Value="public interface IQueue : IDisposable, Java.Interop.IJavaPeerable, Java.Util.ICollection" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IQueue implements class Android.Runtime.IJavaObject, class Java.Interop.IJavaPeerable, class Java.Lang.IIterable, class Java.Util.ICollection, class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:Java.Util.IQueue" />
<TypeSignature Language="F#" Value="type IQueue = interface
 interface ICollection
 interface IIterable
 interface IJavaObject
 interface IDisposable
 interface IJavaPeerable" />
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces>
<Interface>
<InterfaceName>Android.Runtime.IJavaObject</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Interop.IJavaPeerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Lang.IIterable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>Java.Util.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("java/util/Queue", "", "Java.Util.IQueueInvoker")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("java/util/Queue", "", "Java.Util.IQueueInvoker")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]</AttributeName>
<AttributeName Language="F#">[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]</AttributeName>
</Attribute>
</Attributes>
<Docs since="1">
<param name="<E><E>">the type of elements held in this queue</param>
<summary>A collection designed for holding elements prior to processing.</summary>
<remarks>
<para>A collection designed for holding elements prior to processing.
Besides basic <c>Collection</c> operations, queues provide
additional insertion, extraction, and inspection operations.
Each of these methods exists in two forms: one throws an exception
if the operation fails, the other returns a special value (either
<c>null</c> or <c>false</c>, depending on the operation). The
latter form of the insert operation is designed specifically for
use with capacity-restricted <c>Queue</c> implementations; in most
implementations, insert operations cannot fail.
<table class="striped">
<caption>Summary of Queue methods</caption>
<thead>
<tr>
<td></td>
<th scope="col" style="font-weight:normal; font-style:italic">Throws exception</th>
<th scope="col" style="font-weight:normal; font-style:italic">Returns special value</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Insert</th>
<td><c>#add(Object) add(e)</c></td>
<td><c>#offer(Object) offer(e)</c></td>
</tr>
<tr>
<th scope="row">Remove</th>
<td><c>#remove() remove()</c></td>
<td><c>#poll() poll()</c></td>
</tr>
<tr>
<th scope="row">Examine</th>
<td><c>#element() element()</c></td>
<td><c>#peek() peek()</c></td>
</tr>
</tbody>
</table></para>
<para>Queues typically, but do not necessarily, order elements in a
FIFO (first-in-first-out) manner. Among the exceptions are
priority queues, which order elements according to a supplied
comparator, or the elements' natural ordering, and LIFO queues (or
stacks) which order the elements LIFO (last-in-first-out).
Whatever the ordering used, the <em>head</em> of the queue is that
element which would be removed by a call to <c>#remove()</c> or
<c>#poll()</c>. In a FIFO queue, all new elements are inserted at
the <em>tail</em> of the queue. Other kinds of queues may use
different placement rules. Every <c>Queue</c> implementation
must specify its ordering properties.</para>
<para>The <c>#offer offer</c> method inserts an element if possible,
otherwise returning <c>false</c>. This differs from the <c>java.util.Collection#add Collection.add</c> method, which can fail to
add an element only by throwing an unchecked exception. The
<c>offer</c> method is designed for use when failure is a normal,
rather than exceptional occurrence, for example, in fixed-capacity
(or &quot;bounded&quot;) queues.</para>
<para>The <c>#remove()</c> and <c>#poll()</c> methods remove and
return the head of the queue.
Exactly which element is removed from the queue is a
function of the queue's ordering policy, which differs from
implementation to implementation. The <c>remove()</c> and
<c>poll()</c> methods differ only in their behavior when the
queue is empty: the <c>remove()</c> method throws an exception,
while the <c>poll()</c> method returns <c>null</c>.</para>
<para>The <c>#element()</c> and <c>#peek()</c> methods return, but do
not remove, the head of the queue.</para>
<para>The <c>Queue</c> interface does not define the <i>blocking queue
methods</i>, which are common in concurrent programming. These methods,
which wait for elements to appear or for space to become available, are
defined in the <c>java.util.concurrent.BlockingQueue</c> interface, which
extends this interface.</para>
<para>
<c>Queue</c> implementations generally do not allow insertion
of <c>null</c> elements, although some implementations, such as
<c>LinkedList</c>, do not prohibit insertion of <c>null</c>.
Even in the implementations that permit it, <c>null</c> should
not be inserted into a <c>Queue</c>, as <c>null</c> is also
used as a special return value by the <c>poll</c> method to
indicate that the queue contains no elements.</para>
<para>
<c>Queue</c> implementations generally do not define
element-based versions of methods <c>equals</c> and
<c>hashCode</c> but instead inherit the identity based versions
from class <c>Object</c>, because element-based equality is not
always well-defined for queues with the same elements but different
ordering properties.</para>
<para>Added in 1.5.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/Queue" title="Reference documentation">Java documentation for <code>java.util.Queue</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
<Members>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public bool Add (Java.Lang.Object? e);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Add(class Java.Lang.Object e) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.IQueue.Add(Java.Lang.Object)" />
<MemberSignature Language="F#" Value="abstract member Add : Java.Lang.Object -> bool" Usage="iQueue.Add e" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:Java.Util.ICollection.Add(Java.Lang.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("add", "(Ljava/lang/Object;)Z", "GetAdd_Ljava_lang_Object_Handler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("add", "(Ljava/lang/Object;)Z", "GetAdd_Ljava_lang_Object_Handler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="Java.Lang.Object" />
</Parameters>
<Docs>
<param name="e">the element to add</param>
<summary>Inserts the specified element into this queue if it is possible to do so
immediately without violating capacity restrictions, returning
<c>true</c> upon success and throwing an <c>IllegalStateException</c>
if no space is currently available.</summary>
<returns>
<c>true</c> (as specified by <c>Collection#add</c>)</returns>
<remarks>
<para>Inserts the specified element into this queue if it is possible to do so
immediately without violating capacity restrictions, returning
<c>true</c> upon success and throwing an <c>IllegalStateException</c>
if no space is currently available.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/Queue#add(E)" title="Reference documentation">Java documentation for <code>java.util.Queue.add(E)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="Element">
<MemberSignature Language="C#" Value="public Java.Lang.Object? Element ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Lang.Object Element() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.IQueue.Element" />
<MemberSignature Language="F#" Value="abstract member Element : unit -> Java.Lang.Object" Usage="iQueue.Element " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("element", "()Ljava/lang/Object;", "GetElementHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("element", "()Ljava/lang/Object;", "GetElementHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves, but does not remove, the head of this queue.</summary>
<returns>the head of this queue</returns>
<remarks>
<para>Retrieves, but does not remove, the head of this queue. This method
differs from <c>#peek peek</c> only in that it throws an exception
if this queue is empty.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/Queue#element()" title="Reference documentation">Java documentation for <code>java.util.Queue.element()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.NoSuchElementException">if this queue is empty
</exception>
</Docs>
</Member>
<Member MemberName="Offer">
<MemberSignature Language="C#" Value="public bool Offer (Java.Lang.Object? e);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Offer(class Java.Lang.Object e) cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.IQueue.Offer(Java.Lang.Object)" />
<MemberSignature Language="F#" Value="abstract member Offer : Java.Lang.Object -> bool" Usage="iQueue.Offer e" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("offer", "(Ljava/lang/Object;)Z", "GetOffer_Ljava_lang_Object_Handler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("offer", "(Ljava/lang/Object;)Z", "GetOffer_Ljava_lang_Object_Handler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="e" Type="Java.Lang.Object" />
</Parameters>
<Docs>
<param name="e">the element to add</param>
<summary>Inserts the specified element into this queue if it is possible to do
so immediately without violating capacity restrictions.</summary>
<returns>
<c>true</c> if the element was added to this queue, else
<c>false</c></returns>
<remarks>
<para>Inserts the specified element into this queue if it is possible to do
so immediately without violating capacity restrictions.
When using a capacity-restricted queue, this method is generally
preferable to <c>#add</c>, which can fail to insert an element only
by throwing an exception.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/Queue#offer(E)" title="Reference documentation">Java documentation for <code>java.util.Queue.offer(E)</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
</Docs>
</Member>
<Member MemberName="Peek">
<MemberSignature Language="C#" Value="public Java.Lang.Object? Peek ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Lang.Object Peek() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.IQueue.Peek" />
<MemberSignature Language="F#" Value="abstract member Peek : unit -> Java.Lang.Object" Usage="iQueue.Peek " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("peek", "()Ljava/lang/Object;", "GetPeekHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("peek", "()Ljava/lang/Object;", "GetPeekHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves, but does not remove, the head of this queue,
or returns <c>null</c> if this queue is empty.</summary>
<returns>the head of this queue, or <c>null</c> if this queue is empty</returns>
<remarks>
<para>Retrieves, but does not remove, the head of this queue,
or returns <c>null</c> if this queue is empty.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/Queue#peek()" title="Reference documentation">Java documentation for <code>java.util.Queue.peek()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="Poll">
<MemberSignature Language="C#" Value="public Java.Lang.Object? Poll ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Lang.Object Poll() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.IQueue.Poll" />
<MemberSignature Language="F#" Value="abstract member Poll : unit -> Java.Lang.Object" Usage="iQueue.Poll " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("poll", "()Ljava/lang/Object;", "GetPollHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("poll", "()Ljava/lang/Object;", "GetPollHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves and removes the head of this queue,
or returns <c>null</c> if this queue is empty.</summary>
<returns>the head of this queue, or <c>null</c> if this queue is empty</returns>
<remarks>
<para>Retrieves and removes the head of this queue,
or returns <c>null</c> if this queue is empty.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/Queue#poll()" title="Reference documentation">Java documentation for <code>java.util.Queue.poll()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public Java.Lang.Object? Remove ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Java.Lang.Object Remove() cil managed" />
<MemberSignature Language="DocId" Value="M:Java.Util.IQueue.Remove" />
<MemberSignature Language="F#" Value="abstract member Remove : unit -> Java.Lang.Object" Usage="iQueue.Remove " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Mono.Android</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[Android.Runtime.Register("remove", "()Ljava/lang/Object;", "GetRemoveHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]</AttributeName>
<AttributeName Language="F#">[<Android.Runtime.Register("remove", "()Ljava/lang/Object;", "GetRemoveHandler:Java.Util.IQueueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>Java.Lang.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Retrieves and removes the head of this queue.</summary>
<returns>the head of this queue</returns>
<remarks>
<para>Retrieves and removes the head of this queue. This method differs
from <c>#poll() poll()</c> only in that it throws an exception if
this queue is empty.</para>
<para>
<format type="text/html">
<a href="https://developer.android.com/reference/java/util/Queue#remove()" title="Reference documentation">Java documentation for <code>java.util.Queue.remove()</code>.</a>
</format>
</para>
<para>
Portions of this page are modifications based on work created and shared by the
<format type="text/html"><a href="https://developers.google.com/terms/site-policies" title="Android Open Source Project">Android Open Source Project</a></format>
and used according to terms described in the
<format type="text/html"><a href="https://creativecommons.org/licenses/by/2.5/" title="Creative Commons 2.5 Attribution License">Creative Commons 2.5 Attribution License.</a></format></para>
</remarks>
<since version="Added in API level 1" />
<exception cref="T:Java.Util.NoSuchElementException">if this queue is empty
</exception>
</Docs>
</Member>
</Members>
</Type>