public static final <T> Set<T> emptySet ()

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<String> s = Collections.emptySet();

<T>    the class of the objects in the set

Returns:  the empty set

See also:

Since:  1.5

@implNote Implementations of this method need not create a separate Set object for each call. Using this method is likely to have comparable cost to using the like-named field. (Unlike this method, the field does not provide type safety.)