ect
is passed to, e.g., <code>contains</code>, then the <code>isValidKey</code> function should
also be supplied.</p>
<p>If <code>isValidKey</code> is omitted, it defaults to testing if the object is an
<code>E</code> instance. That means that:</p>
<pre class="language-dart"><code>new HashSet&lt;int&gt;(equals: (int e1, int e2) =&gt; (e1 - e2) % 5 == 0,
                 hashCode: (int e) =&gt; e % 5)
</code></pre>
<p>does not need an <code>isValidKey</code> argument, because it defaults to only
accepting <c