public ArrayList<MechSummary> generateUnits(int num,UnitFilter filter){
  ArrayList<MechSummary> retVal=new ArrayList<>();
  for (int i=0; i < num; i++) {
    MechSummary ms=generateUnit(filter);
    if (ms != null) {
      retVal.add(ms);
    }
  }
  return retVal;
}

public ArrayList < MechSummary > generateUnits ( int num , UnitFilter filter ) { ArrayList < MechSummary > retVal = new ArrayList < > ( ) ; for ( int i = 0 ; i < num ; i ++ ) { MechSummary ms = generateUnit ( filter ) ; if ( ms != null ) { retVal . add ( ms ) ; } } return retVal ; }
selects a number of units from the table with a filter .
