Subclass specification
CharSet is not a subtype of Set&lt;E&gt;, but it is a subtype of Set&lt;Character&gt;.  If you compare the signatures of the contains methods for Set&lt;Character&gt; and CharSet, you'll see that the preconditions are identical.
It might be helpful to imagine that Set is not a type and is not meaningful on its own; you have to instantiate the generic parameter to obtain a type.