LinkedBlockingDeque.OfferLast 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.
Overloads
| Name | Description |
|---|---|
| OfferLast(Object) |
Inserts the specified element at the end of this deque if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available. |
| OfferLast(Object, Int64, TimeUnit) |
Inserts the specified element at the end of this deque, waiting up to the specified wait time if necessary for space to become available. |
OfferLast(Object)
Inserts the specified element at the end of this deque if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available.
[Android.Runtime.Register("offerLast", "(Ljava/lang/Object;)Z", "GetOfferLast_Ljava_lang_Object_Handler")]
public virtual bool OfferLast(Java.Lang.Object? e);
[<Android.Runtime.Register("offerLast", "(Ljava/lang/Object;)Z", "GetOfferLast_Ljava_lang_Object_Handler")>]
abstract member OfferLast : Java.Lang.Object -> bool
override this.OfferLast : Java.Lang.Object -> bool
Parameters
- e
- Object
the element to add
Returns
true if the element was added to this deque, else false
Implements
- Attributes
Remarks
Inserts the specified element at the end of this deque if it is possible to do so immediately without violating capacity restrictions, returning true upon success and false if no space is currently available. When using a capacity-restricted deque, this method is generally preferable to the addLast method, which can fail to insert an element only by throwing an exception.
Java reference for java.util.concurrent.LinkedBlockingDeque.offerLast.
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.
Applies to
OfferLast(Object, Int64, TimeUnit)
Inserts the specified element at the end of this deque, waiting up to the specified wait time if necessary for space to become available.
[Android.Runtime.Register("offerLast", "(Ljava/lang/Object;JLjava/util/concurrent/TimeUnit;)Z", "GetOfferLast_Ljava_lang_Object_JLjava_util_concurrent_TimeUnit_Handler")]
public virtual bool OfferLast(Java.Lang.Object? e, long timeout, Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("offerLast", "(Ljava/lang/Object;JLjava/util/concurrent/TimeUnit;)Z", "GetOfferLast_Ljava_lang_Object_JLjava_util_concurrent_TimeUnit_Handler")>]
abstract member OfferLast : Java.Lang.Object * int64 * Java.Util.Concurrent.TimeUnit -> bool
override this.OfferLast : Java.Lang.Object * int64 * Java.Util.Concurrent.TimeUnit -> bool
Parameters
- e
- Object
the element to add
- timeout
- Int64
how long to wait before giving up, in units of unit
- unit
- TimeUnit
a TimeUnit determining how to interpret the timeout parameter
Returns
true if successful, or false if the specified waiting time elapses before space is available
Implements
- Attributes
Remarks
Inserts the specified element at the end of this deque, waiting up to the specified wait time if necessary for space to become available.
Java reference for java.util.concurrent.LinkedBlockingDeque.offerLast.
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.