title: How to write a method with a class as a parameter
body: <p>I'm writing a compulsory assignment for my java class, we have a prepared method that must be coded to make a MST of a Graph. In the prepared method it's using another class as a parameter, and I'm wondering how i can implement this parameter into my code.</p>
  <p>prepared code:</p>
  <pre><code>    public &lt;T, E extends Comparable&lt;E&gt;&gt; ArrayList&lt;Edge&lt;T&gt;&gt; mst(WeightedGraph&lt;T, E&gt; g) {
  
      }
  </code></pre>
  <p>WeightedGraph: another class in the compulsory file</p>
  <p>T: the type of vertices</p>
  <p>E: the type of edges</p>
  <p>Now lets say i wanted to write:</p>
  <pre><code>if(T &gt; 10)
       do something
  </code></pre>
  <p>How would i do that, how can i reference T or E or other methods from &quot;WeightedGraph&quot;?</p>