title: Specify Generics in interface extends
body: <p>Should I specify the concrete type for generic types when extending an interface with another interface?</p>
  
  <p>What I mean is, if I have an interface:</p>
  
  <pre><code>public interface Repo&lt;T&gt;{
        Collection&lt;T&gt; search(String params);
        T get(String id);
  }
  </code></pre>
  
  <p>and then a whole bunch specific Repositories, like <strong>ClientRepo</strong>, <strong>CustomerRepo</strong>, etc... is it reasonable to specify the type <strong>T</strong> when extending this interface, e.g.:</p>
  
  <pre><code>public interface ClientRepo extends Repo&lt;Client&gt;{
  }
  public interface CustomerRepo extends Repo&lt;Customer&gt;{
  }
  </code></pre>
  
  <p>where Client and Customer are just some classes.</p>
  
  <p>Did anyone have a similar problem? I mean I could do:</p>
  
  <pre><code>public interface ClientRepo&lt;T&gt; extends Repo&lt;T&gt;{
  }
  </code></pre>
  
  <p><strong>Addendum</strong>:
  Perhaps I should make my intent for having specific Repos (e.g. ClientRepo) more clear. There is another interface  called <strong>RepoFactory</strong> that returns appropriate Repo to the client, e.g.:</p>
  
  <pre><code>public interface RepoFactory{
        ClientRepo createClientRepo();
        CustomerRepo createCustomerRepo();
  }
  </code></pre>
  
  <p>This factory is implemented by <strong>implementors</strong> which in turn, provide the appropriate implementations of the concrete Repos.</p>
  
  <p>In fact from the above you could say that the interface <strong>Repo&lt;T></strong> is not used by the client of the api.</p>
  
  <p>Confusing enough I hope!!! Sorry :(</p>