for (Enumeration e = tank.getWeapons(); e.hasMoreElements(); ) { Mounted m = (Mounted) e.nextElement();
for (Mounted m : tank.getWeaponList()) {
    public float getTankWeightTurret()    {        float weight = 0f;        for (Enumeration e = tank.getWeapons(); e.hasMoreElements(); )        {            Mounted m = (Mounted) e.nextElement();            if (m.getLocation()==Tank.LOC_TURRET)                weight += ((WeaponType) m.getType()).getTonnage(tank);        }        return ceilMaxHalf(weight / 10.0f, getWeightCeilingTurret());    }