for (Enumeration e = tank.getWeapons(); e.hasMoreElements(); ) { Mounted m = (Mounted) e.nextElement();
for (Mounted m : tank.getWeaponList()) {
    private int getTankCountHeatLaserWeapons()    {        int heat = 0;         for (Enumeration e = tank.getWeapons(); e.hasMoreElements(); )        {               Mounted m = (Mounted) e.nextElement();            WeaponType wt = (WeaponType) m.getType();            if (wt.hasFlag(WeaponType.F_LASER) || wt.hasFlag(WeaponType.F_PPC))                heat += wt.getHeat();        }        return heat;    }