How to use paramatrization in java?
<p>I have this java code which uses <code>&lt;T&gt;</code>:</p>

<pre><code>public static class mySet&lt;T&gt; extends Set {

    // Define a list object using parametric polymorphism
    public final List&lt;T&gt; set;

    // Define the constructor for a Set data type
    public &lt;T&gt; mySet(List&lt;T&gt; given_set) {
        this.set = (List&lt;T&gt;) given_set;
    }
}
</code></pre>

<p>however I get an error here <code>(List&lt;T&gt;) given_set;</code>.
It should work because I am making it the same type as the final variable set, but it doesn't.</p>

<p>Does anyone know why?</p>

<p>Eclipse is saying: <code>Type mismatch: cannot convert from java.util.List&lt;T&gt; to java.util.List&lt;T&gt;</code>.</p>
