int activeCount = getActiveSinks();  for (Enumeration i = miscList.elements(); i.hasMoreElements() && activeCount > 0;) { Mounted mounted = (Mounted)i.nextElement();
for (Mounted mounted : getMisc()) {
    public int getHeatCapacity() {        int capacity = 0;        int activeCount = getActiveSinks();                for (Enumeration i = miscList.elements(); i.hasMoreElements() && activeCount > 0;) {            Mounted mounted = (Mounted)i.nextElement();            if (mounted.isDestroyed() || mounted.isBreached()) {                continue;            }            if (mounted.getType().hasFlag(MiscType.F_HEAT_SINK)) {                capacity++;                activeCount--;            } else if(mounted.getType().hasFlag(MiscType.F_DOUBLE_HEAT_SINK)) {                activeCount--;                capacity += 2;            }        }                return capacity;    }