for (Enumeration e = getEntity().getAmmo(); e.hasMoreElements(); ) { Mounted m = (Mounted) e.nextElement();
for (Mounted m : getEntity().getAmmo()) {
    public float getWeightAmmo()    {        float weight = 0.0f;        for (Enumeration e = getEntity().getAmmo(); e.hasMoreElements(); )        {            Mounted m = (Mounted) e.nextElement();            // One Shot Ammo            if (m.getLocation()==Entity.LOC_NONE)                continue;            AmmoType mt = (AmmoType) m.getType();            weight += mt.getTonnage(getEntity());        }        return weight;    }