Stack.Search(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.
Returns the 1-based position where an object is on this stack.
[Android.Runtime.Register("search", "(Ljava/lang/Object;)I", "GetSearch_Ljava_lang_Object_Handler")]
public virtual int Search (Java.Lang.Object? o);
[<Android.Runtime.Register("search", "(Ljava/lang/Object;)I", "GetSearch_Ljava_lang_Object_Handler")>]
abstract member Search : Java.Lang.Object -> int
override this.Search : Java.Lang.Object -> int
Parameters
- o
- Object
the desired object.
Returns
the 1-based position from the top of the stack where
the object is located; the return value -1
indicates that the object is not on the stack.
- Attributes
Remarks
Returns the 1-based position where an object is on this stack. If the object o
occurs as an item in this stack, this method returns the distance from the top of the stack of the occurrence nearest the top of the stack; the topmost item on the stack is considered to be at distance 1
. The equals
method is used to compare o
to the items in this stack.
Java documentation for java.util.Stack.search(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.