List.Of 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
Of() |
Obsolete.
Returns an unmodifiable list containing zero elements. |
Of(Object) |
Obsolete.
Returns an unmodifiable list containing one element. |
Of(Object[]) |
Obsolete.
Returns an unmodifiable list containing an arbitrary number of elements. |
Of(Object, Object) |
Obsolete.
Returns an unmodifiable list containing two elements. |
Of(Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing three elements. |
Of(Object, Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing four elements. |
Of(Object, Object, Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing five elements. |
Of(Object, Object, Object, Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing six elements. |
Of(Object, Object, Object, Object, Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing seven elements. |
Of(Object, Object, Object, Object, Object, Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing eight elements. |
Of(Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing nine elements. |
Of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Obsolete.
Returns an unmodifiable list containing ten elements. |
Of()
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing zero elements.
[Android.Runtime.Register("of", "()Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of ();
[<Android.Runtime.Register("of", "()Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : unit -> System.Collections.IList
Returns
an empty List
- Attributes
Remarks
Returns an unmodifiable list containing zero elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of()
.
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
Of(Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing one element.
[Android.Runtime.Register("of", "(Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the single element
Returns
a List
containing the specified element
- Attributes
Remarks
Returns an unmodifiable list containing one element.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E)
.
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
Of(Object[])
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing an arbitrary number of elements.
[Android.Runtime.Register("of", "([Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (params Java.Lang.Object[] elements);
[<Android.Runtime.Register("of", "([Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object[] -> System.Collections.IList
Parameters
- elements
- Object[]
the elements to be contained in the list
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing an arbitrary number of elements. See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E...)
.
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
Of(Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing two elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing two elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E)
.
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
Of(Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing three elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing three elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E)
.
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
Of(Object, Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing four elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3, Java.Lang.Object e4);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing four elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E, E)
.
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
Of(Object, Object, Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing five elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3, Java.Lang.Object e4, Java.Lang.Object e5);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
- e5
- Object
the fifth element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing five elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E, E, E)
.
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
Of(Object, Object, Object, Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing six elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3, Java.Lang.Object e4, Java.Lang.Object e5, Java.Lang.Object e6);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
- e5
- Object
the fifth element
- e6
- Object
the sixth element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing six elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E, E, E, E)
.
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
Of(Object, Object, Object, Object, Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing seven elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3, Java.Lang.Object e4, Java.Lang.Object e5, Java.Lang.Object e6, Java.Lang.Object e7);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
- e5
- Object
the fifth element
- e6
- Object
the sixth element
- e7
- Object
the seventh element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing seven elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E, E, E, E, E)
.
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
Of(Object, Object, Object, Object, Object, Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing eight elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3, Java.Lang.Object e4, Java.Lang.Object e5, Java.Lang.Object e6, Java.Lang.Object e7, Java.Lang.Object e8);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
- e5
- Object
the fifth element
- e6
- Object
the sixth element
- e7
- Object
the seventh element
- e8
- Object
the eighth element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing eight elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E, E, E, E, E, E)
.
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
Of(Object, Object, Object, Object, Object, Object, Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing nine elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3, Java.Lang.Object e4, Java.Lang.Object e5, Java.Lang.Object e6, Java.Lang.Object e7, Java.Lang.Object e8, Java.Lang.Object e9);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
- e5
- Object
the fifth element
- e6
- Object
the sixth element
- e7
- Object
the seventh element
- e8
- Object
the eighth element
- e9
- Object
the ninth element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing nine elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E, E, E, E, E, E, E)
.
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
Of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)
Caution
Use 'Java.Util.IList.Of'. This class will be removed in a future release.
Returns an unmodifiable list containing ten elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
[System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")]
public static System.Collections.IList Of (Java.Lang.Object e1, Java.Lang.Object e2, Java.Lang.Object e3, Java.Lang.Object e4, Java.Lang.Object e5, Java.Lang.Object e6, Java.Lang.Object e7, Java.Lang.Object e8, Java.Lang.Object e9, Java.Lang.Object e10);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
[<System.Obsolete("Use 'Java.Util.IList.Of'. This class will be removed in a future release.")>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.IList
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
- e5
- Object
the fifth element
- e6
- Object
the sixth element
- e7
- Object
the seventh element
- e8
- Object
the eighth element
- e9
- Object
the ninth element
- e10
- Object
the tenth element
Returns
a List
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable list containing ten elements.
See Unmodifiable Lists for details.
Added in 9.
Java documentation for java.util.List.of(E, E, E, E, E, E, E, E, E, E)
.
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.