List<Unit> selectedUnits = new ArrayList<Unit>();  Iterator<ChooserEntry> entries = m_entries.iterator(); while(entries.hasNext()) { ChooserEntry chooserEntry = entries.next(); if(chooserEntry.isTwoHit()) addToCollection(selectedUnits, chooserEntry,  chooserEntry.getSecondHits(), selectDependents); else addToCollection(selectedUnits, chooserEntry, chooserEntry.getFirstHits(), selectDependents);  } return selectedUnits;
return getSelected(true);
  public List<Unit> getSelected(boolean selectDependents)  {    List<Unit> selectedUnits = new ArrayList<Unit>();    Iterator<ChooserEntry> entries = m_entries.iterator();    while(entries.hasNext())    {      ChooserEntry chooserEntry = entries.next();      if(chooserEntry.isTwoHit())          addToCollection(selectedUnits, chooserEntry,  chooserEntry.getSecondHits(), selectDependents);      else          addToCollection(selectedUnits, chooserEntry, chooserEntry.getFirstHits(), selectDependents);    }    return selectedUnits;  }