IBlockingDeque.Add(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts the specified element into the queue represented by this deque
(in other words, at the tail of this deque) if it is possible to do so
immediately without violating capacity restrictions, returning
true
upon success and throwing an
IllegalStateException
if no space is currently available.
[Android.Runtime.Register("add", "(Ljava/lang/Object;)Z", "GetAdd_Ljava_lang_Object_Handler:Java.Util.Concurrent.IBlockingDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool Add (Java.Lang.Object? e);
[<Android.Runtime.Register("add", "(Ljava/lang/Object;)Z", "GetAdd_Ljava_lang_Object_Handler:Java.Util.Concurrent.IBlockingDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Add : Java.Lang.Object -> bool
Parameters
- e
- Object
the element to add
Returns
Implements
- Attributes
Remarks
Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque) if it is possible to do so immediately without violating capacity restrictions, returning true
upon success and throwing an IllegalStateException
if no space is currently available. When using a capacity-restricted deque, it is generally preferable to use #offer(Object) offer
.
This method is equivalent to #addLast(Object) addLast
.
Java documentation for java.util.concurrent.BlockingDeque.add(E)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.