} if (!(listenerSet.contains(listener))) { listenerSet.add(listener);
    public void addDataUpdateListener(DataUpdateListener listener, int type) {        try{            HashSet listenerSet = null;            if (type == DataUpdateListener.DOWNLOAD_CHANGED)            {                listenerSet = downloadListener;            }            else if (type == DataUpdateListener.NETINFO_CHANGED)            {                listenerSet = networkInfoListener;            }            else if (type == DataUpdateListener.SERVER_CHANGED)            {                listenerSet = serverListener;            }            else if (type == DataUpdateListener.SHARE_CHANGED)            {                listenerSet = shareListener;            }            else if (type == DataUpdateListener.UPLOAD_CHANGED)            {                listenerSet = uploadListener;            }            else if (type == DataUpdateListener.STATUSBAR_CHANGED)            {                listenerSet = statusbarListener;            }            else if (type == DataUpdateListener.SPEED_CHANGED)            {                listenerSet = speedListener;            }            else if (type == DataUpdateListener.SEARCH_CHANGED)            {                listenerSet = searchListener;            }            else            {                return;            }            if (!(listenerSet.contains(listener)))            {                listenerSet.add(listener);            }        }        catch (Exception e)        {            if (logger.isEnabledFor(Level.ERROR))                logger.error("Unbehandelte Exception", e);        }    }