title: Is it possible to have an interface method defined with a generic return type and a concrete implementation define the return type?
body: <p>I have would like to create an interface:</p>
  
  <pre><code>public interface OperandValue
  {
      &lt;T&gt; T getValue();
  }
  </code></pre>
  
  <p>I would then like to have a concrete implementation like this:</p>
  
  <pre><code>public class NumberOperandValue implements OperandValue
  {
      @Override
      public &lt;Integer&gt; Integer getValue()
      {
          // some integer value that is set elsewhere
          return 1;
      }
  }
  </code></pre>
  
  <p>Eclipse is underlining the <code>&lt;Integer&gt;</code> giving me a warning that says:</p>
  
  <blockquote>
    <p>The type parameter Integer is hiding the type Integer</p>
  </blockquote>
  
  <p>I appreciate any suggestions on if this can work somehow.  I realize that I could define the generic type at the interface level and not the method level, but would like to try to get this to work if possible.</p>