Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Remove() |
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque). |
Remove(Object) |
Removes the first occurrence of the specified element from this deque. |
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque).
[Android.Runtime.Register("remove", "()Ljava/lang/Object;", "GetRemoveHandler:Java.Util.IDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? Remove();
[<Android.Runtime.Register("remove", "()Ljava/lang/Object;", "GetRemoveHandler:Java.Util.IDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Remove : unit -> Java.Lang.Object
the head of the queue represented by this deque
if this deque is empty
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque). This method differs from #poll() poll()
only in that it throws an exception if this deque is empty.
This method is equivalent to #removeFirst()
.
Java documentation for java.util.Deque.remove()
.
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.
Removes the first occurrence of the specified element from this deque.
[Android.Runtime.Register("remove", "(Ljava/lang/Object;)Z", "GetRemove_Ljava_lang_Object_Handler:Java.Util.IDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool Remove(Java.Lang.Object? o);
[<Android.Runtime.Register("remove", "(Ljava/lang/Object;)Z", "GetRemove_Ljava_lang_Object_Handler:Java.Util.IDequeInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Remove : Java.Lang.Object -> bool
element to be removed from this deque, if present
true
if an element was removed as a result of this call
if the class of the specified element is incompatible with this deque (optional)
if the specified element is null and this deque does not permit null elements (optional)
Removes the first occurrence of the specified element from this deque. If the deque does not contain the element, it is unchanged. More formally, removes the first element e
such that Objects.equals(o, e)
(if such an element exists). Returns true
if this deque contained the specified element (or equivalently, if this deque changed as a result of the call).
This method is equivalent to #removeFirstOccurrence(Object)
.
Java documentation for java.util.Deque.remove(java.lang.Object)
.
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.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in