for (Enumeration e = getMisc(); e.hasMoreElements(); ) { Mounted m = (Mounted)e.nextElement();
for (Mounted m:getMisc()) {
    public boolean hasShield() {        int shieldCount = 0;                //only mechs can have shields.        if ( !(this instanceof Mech) )            return false;                for (Enumeration e = getMisc(); e.hasMoreElements(); ) {            Mounted m = (Mounted)e.nextElement();            EquipmentType type = m.getType();            if (type instanceof MiscType &&((MiscType)type).isShield()                    && this.getInternal(m.getLocation()) > 0) {                shieldCount++;            }        }        return shieldCount > 0;    }