for (Enumeration j = getAmmo(); j.hasMoreElements();) { Mounted amounted = (Mounted)j.nextElement();
for(Mounted amounted : getAmmo()) {
    public int getTotalMunitionsOfType(EquipmentType et) {        int totalShotsLeft = 0;        for (Enumeration j = getAmmo(); j.hasMoreElements();) {            Mounted amounted = (Mounted)j.nextElement();            if ( amounted.getType().equals(et) && !amounted.isDumping() ) {                totalShotsLeft += amounted.getShotsLeft();            }        }        return totalShotsLeft;    }