Iterator it = sourcen.values().iterator(); while (it.hasNext()) { speed += ( (DownloadSourceDO) it.next()).getSpeed();
synchronized (sourcen){ Iterator it = sourcen.values().iterator(); while (it.hasNext()) { speed += ( (DownloadSourceDO) it.next()).getSpeed(); }
    public long getSpeedInBytes() {        long speed = 0;        try {            Iterator it = sourcen.values().iterator();            while (it.hasNext()) {                speed += ( (DownloadSourceDO) it.next()).getSpeed();            }        }        catch (Exception e) {            if (logger.isEnabledFor(Level.ERROR)) {                logger.error("Unbehandelte Exception", e);            }        }        return speed;    }