for (Enumeration e = getMisc(); e.hasMoreElements(); ) { Mounted m = (Mounted)e.nextElement();
for(Mounted m:getMisc()) {
    public int getNumberOfShields(int size) {        //only mechs can have shields.        if ( !(this instanceof Mech) )            return 0;                int raShield = 0;        int laShield = 0;                for (Enumeration e = getMisc(); e.hasMoreElements(); ) {            Mounted m = (Mounted)e.nextElement();            EquipmentType type = m.getType();            if (type instanceof MiscType && type.hasFlag(MiscType.F_CLUB)                    && (type.hasSubType(size)) ) {                //ok so we have a shield of certain size. no which arm is it.                if ( m.getLocation() == Mech.LOC_RARM )                    raShield = 1;                if ( m.getLocation() == Mech.LOC_LARM )                    laShield = 1;                //break now.                if ( raShield > 0 && laShield > 0)                    return 2;            }        }        return raShield+laShield;    }