title: Subclasses & overloaded methods
body: <p>I have an overloaded method, each taking a subclass of <code>Member</code></p>
  
  <pre><code>public void addMember(Player p) {
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public void addMember(Supporter s) {
  </code></pre>
  
  <p>I have an <code>ArrayList&lt;Member&gt;</code> that I would like to loop through and for each <code>Member</code>, call the <code>addMember()</code> method passing the subclass instance.</p>
  
  <p>Something like</p>
  
  <pre><code>for(Member m : members) {
      this.addMember(m);
  }
  </code></pre>
  
  <p>But can't because I dont have a method of <code>addMember(Member m)</code></p>
  
  <p>Is there a solution that involves keeping my overloaded methods at all?</p>
  
  <p>Cheers.</p>