title: casting & generics to enable list concatenation in Java 8
body: <p>Apologies that is probably the worst Title I've used but I can't quite think how to word it.</p>
  
  <p>I'm calling a method table.getColData(COL_1) which returns a generic</p>
  
  <pre><code>public &lt;T extends Object&gt; List&lt;T&gt; getColData(final String col)
  </code></pre>
  
  <p>I am calling it twice and getting two lists of strings.  I want to concatenate these and have ended up with this - </p>
  
  <pre><code>List&lt;String&gt; a = table.getColData(col1);
  List&lt;String&gt; b = table.getColData(col2);
  
  List &lt;String&gt; c = Stream.concat(a.stream(), b.stream()).collect(Collectors.toList());
  </code></pre>
  
  <p>which works nicely I think. I can't find a way to avoid the 2 declarations though without getting an error as the <code>concat</code> thinks it has a list of objects that are not <code>String</code>s (prompt: change type of <code>c</code> to <code>List&lt;Object&gt;</code>) ? </p>
  
  <p>Is there an easy way to do this to make it look a little more polished?!</p>