共用方式為


Collections.Singleton(Object) 方法

定義

傳回只包含指定之物件的不可變集合。

[Android.Runtime.Register("singleton", "(Ljava/lang/Object;)Ljava/util/Set;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static System.Collections.ICollection Singleton (Java.Lang.Object? o);
[<Android.Runtime.Register("singleton", "(Ljava/lang/Object;)Ljava/util/Set;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Singleton : Java.Lang.Object -> System.Collections.ICollection

參數

o
Object

要儲存在傳回集合中的唯一物件。

傳回

只包含指定之物件的不可變集合。

屬性

備註

傳回只包含指定之物件的不可變集合。 傳回的集合可串行化。

java.util.Collections.singleton(T)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於