private static float allairstrength(final Collection<Unit> units,final boolean attacking){
  float airstrength=0.0F;
  for (  final Unit u : units) {
    final UnitAttachment unitAttachment=UnitAttachment.get(u.getType());
    airstrength+=1.00F;
    if (attacking) {
      airstrength+=unitAttachment.getAttack(u.getOwner());
    }
 else {
      airstrength+=unitAttachment.getDefense(u.getOwner());
    }
  }
  return airstrength;
}

private static float allairstrength ( final Collection < Unit > units , final boolean attacking ) { float airstrength = 0.0F ; for ( final Unit u : units ) { final UnitAttachment unitAttachment = UnitAttachment . get ( u . getType ( ) ) ; airstrength += 1.00F ; if ( attacking ) { airstrength += unitAttachment . getAttack ( u . getOwner ( ) ) ; } else { airstrength += unitAttachment . getDefense ( u . getOwner ( ) ) ; } } return airstrength ; }
determine the strength of a collection of airunits caller should guarantee units are all air .
