Aracılığıyla paylaş


Collections.EmptySet Method

Definition

Returns an empty set (immutable).

[Android.Runtime.Register("emptySet", "()Ljava/util/Set;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static System.Collections.ICollection EmptySet ();
[<Android.Runtime.Register("emptySet", "()Ljava/util/Set;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member EmptySet : unit -> System.Collections.ICollection

Returns

the empty set

Attributes

Remarks

Returns an empty set (immutable). This set is serializable. Unlike the like-named field, this method is parameterized.

This example illustrates the type-safe way to obtain an empty set:

Set&lt;String&gt; s = Collections.emptySet();

Added in 1.5.

Java documentation for java.util.Collections.emptySet().

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