title: How to avoid unchecked cast warning when cloning a HashSet?
body: <p>I'm trying to make a shallow copy of a HashSet of Points called myHash. As of now, I have the following:</p>
  
  <pre><code>HashSet&lt;Point&gt; myNewHash = (HashSet&lt;Point&gt;) myHash.clone();
  </code></pre>
  
  <p>This code gives me an unchecked cast warning however. Is there a better way to do this?</p>