public static <T> Set<T> unmodifiableSet (Set<? extends T> s)

Returns an unmodifiable view of the specified set. Query operations on the returned set "read through" to the specified set, and attempts to modify the returned set, whether direct or via its iterator, result in an UnsupportedOperationException.

The returned set will be serializable if the specified set is serializable.

Parameters:
<T>    the class of the objects in the set
s    the set for which an unmodifiable view is to be returned.

Returns:  an unmodifiable view of the specified set.