Collections.SingletonList(Object) Method
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 an immutable list containing only the specified object.
[Android.Runtime.Register("singletonList", "(Ljava/lang/Object;)Ljava/util/List;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static System.Collections.IList SingletonList (Java.Lang.Object? o);
[<Android.Runtime.Register("singletonList", "(Ljava/lang/Object;)Ljava/util/List;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member SingletonList : Java.Lang.Object -> System.Collections.IList
- o
- Object
the sole object to be stored in the returned list.
an immutable list containing only the specified object.
- Attributes
Returns an immutable list containing only the specified object. The returned list is serializable.
Added in 1.3.
Java documentation for java.util.Collections.singletonList(T)
.
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.
Product | Versions |
---|---|
.NET for Android | .NET for Android API 34, .NET for Android API 35 |