for (Enumeration j = getAmmo(); j.hasMoreElements() && !found;) { Mounted amounted = (Mounted)j.nextElement();
for(Mounted amounted : getAmmo()) {
    public boolean hasInfernoAmmo() {        boolean found = false;        // Walk through the unit's ammo, stop when we find a match.        for (Enumeration j = getAmmo(); j.hasMoreElements() && !found;) {            Mounted amounted = (Mounted)j.nextElement();            AmmoType atype = (AmmoType)amounted.getType();            if (((atype.getAmmoType() == AmmoType.T_SRM) || (atype.getAmmoType() == AmmoType.T_BA_INFERNO))                    && atype.getMunitionType() == AmmoType.M_INFERNO                    && amounted.getShotsLeft() > 0 ) {                found = true;            }        }        return found;    }