ISet.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(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Returns an unmodifiable set containing ten elements. |
Of(Object, Object, Object, Object, Object, Object, Object, Object, Object) |
Returns an unmodifiable set containing nine elements. |
Of(Object, Object, Object, Object, Object, Object, Object, Object) |
Returns an unmodifiable set containing eight elements. |
Of(Object, Object, Object, Object, Object, Object, Object) |
Returns an unmodifiable set containing seven elements. |
Of(Object, Object, Object, Object, Object, Object) |
Returns an unmodifiable set containing six elements. |
Of(Object, Object, Object, Object, Object) |
Returns an unmodifiable set containing five elements. |
Of(Object, Object) |
Returns an unmodifiable set containing two elements. |
Of(Object, Object, Object) |
Returns an unmodifiable set containing three elements. |
Of(Object[]) |
Returns an unmodifiable set containing an arbitrary number of elements. |
Of(Object) |
Returns an unmodifiable set containing one element. |
Of() |
Returns an unmodifiable set containing zero elements. |
Of(Object, Object, Object, Object) |
Returns an unmodifiable set containing four elements. |
Of(Object, Object, Object, Object, Object, Object, Object, Object, Object, Object)
Returns an unmodifiable set 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/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
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.ICollection
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 Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing ten elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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.
Applies to
Of(Object, Object, Object, Object, Object, Object, Object, Object, Object)
Returns an unmodifiable set 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/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
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.ICollection
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 Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing nine elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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)
Returns an unmodifiable set 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/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
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.ICollection
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 Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing eight elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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)
Returns an unmodifiable set 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/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
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.ICollection
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 Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing seven elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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)
Returns an unmodifiable set 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/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.ICollection
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 Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing six elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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)
Returns an unmodifiable set containing five elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.ICollection
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 Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing five elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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)
Returns an unmodifiable set containing two elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection Of (Java.Lang.Object e1, Java.Lang.Object e2);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : Java.Lang.Object * Java.Lang.Object -> System.Collections.ICollection
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
Returns
a Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing two elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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)
Returns an unmodifiable set containing three elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.ICollection
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
Returns
a Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing three elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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[])
Returns an unmodifiable set containing an arbitrary number of elements.
[Android.Runtime.Register("of", "([Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection Of (params Java.Lang.Object[] elements);
[<Android.Runtime.Register("of", "([Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : Java.Lang.Object[] -> System.Collections.ICollection
Parameters
- elements
- Object[]
the elements to be contained in the set
Returns
a Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing an arbitrary number of elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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)
Returns an unmodifiable set containing one element.
[Android.Runtime.Register("of", "(Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection Of (Java.Lang.Object e1);
[<Android.Runtime.Register("of", "(Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : Java.Lang.Object -> System.Collections.ICollection
Parameters
- e1
- Object
the single element
Returns
a Set
containing the specified element
- Attributes
Remarks
Returns an unmodifiable set containing one element. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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()
Returns an unmodifiable set containing zero elements.
[Android.Runtime.Register("of", "()Ljava/util/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection Of ();
[<Android.Runtime.Register("of", "()Ljava/util/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : unit -> System.Collections.ICollection
Returns
an empty Set
- Attributes
Remarks
Returns an unmodifiable set containing zero elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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, Object, Object, Object)
Returns an unmodifiable set containing four elements.
[Android.Runtime.Register("of", "(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Set;", "", ApiSince=30)]
[Java.Interop.JavaTypeParameters(new System.String[] { "E" })]
public static System.Collections.ICollection 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/Set;", "", ApiSince=30)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "E" })>]
static member Of : Java.Lang.Object * Java.Lang.Object * Java.Lang.Object * Java.Lang.Object -> System.Collections.ICollection
Parameters
- e1
- Object
the first element
- e2
- Object
the second element
- e3
- Object
the third element
- e4
- Object
the fourth element
Returns
a Set
containing the specified elements
- Attributes
Remarks
Returns an unmodifiable set containing four elements. See Unmodifiable Sets for details.
Added in 9.
Java documentation for java.util.Set.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.