title: Overloading an Abstract method in Java?
body: <p>I have the following interface and abstract class:</p>
  <pre><code>public interface DataExporter {
      MultipartFile export() throws IOException;
  }
  
  
  public abstract class AbstractExporter&lt;T&gt; implements DataExporter {
      protected abstract Iterable&lt;T&gt; getData();
  }
  </code></pre>
  <p>I call <code>getData()</code> method in my exporter class as shown below:</p>
  <pre><code>public class EmployeeExporter extends AbstractExporter&lt;EmployeeDTO&gt; {
      
      protected Iterable&lt;EmployeeDTO&gt; getData() {
          // code omitted
      }
  }
  </code></pre>
  <p>However, in another class e.g. ManagerExporter, I need to pass parameter to the <code>getData()</code> method:</p>
  <pre><code>public class ManagerExporter extends AbstractExporter&lt;ManagerDTO&gt; {
      
      protected Iterable&lt;ManagerDTO&gt; getData(UUID uuid) {
          // code omitted
      }
  }
  </code></pre>
  <p>I think overloading that method in <code>AbstractExporter</code> is not a good idea,
  because in that case <code>EmployeeExporter</code> will need to implement it even if it does not use it. So, what is the most proper approach to use <code>getData()</code> method with &amp; without parameter?</p>
  <p><strong>Note</strong>: I might also need other implementations that require multiple parameters e.g. <code>protected Iterable&lt;ManagerDTO&gt; getData(UUID uuid, UUID departmentUuid, UUID staffUuid)</code>. In this case, should I need to use an Object array, etc. like <code>Object[]</code>?</p>