LinkedList list = (LinkedList) serviceListeners.get(rec.name.toLowerCase());
List list = (List) serviceListeners.get(rec.name.toLowerCase());
    void updateRecord(long now, DNSRecord rec) {        for (Enumeration e = listeners.elements() ; e.hasMoreElements() ;) {            DNSListener listener = (DNSListener)e.nextElement();            listener.updateRecord(this, now, rec);        }        if (rec.type == DNSConstants.TYPE_PTR || rec.type == DNSConstants.TYPE_SRV) {            LinkedList list = (LinkedList) serviceListeners.get(rec.name.toLowerCase());            if (list != null) {                boolean expired = rec.isExpired(now);                String type = rec.name;                String name = ((DNSRecord.Pointer)rec).alias;                // DNSRecord old = (DNSRecord)services.get(name.toLowerCase());                if (! expired) {                    // new record                    ServiceEvent event = new ServiceEvent(this, type, toUnqualifiedName(type, name), null);                    for (Iterator i=list.iterator(); i.hasNext(); ) {                        ((ServiceListener) i.next()).serviceAdded(event);                    }                } else {                    // expire record                    ServiceEvent event = new ServiceEvent(this, type, toUnqualifiedName(type, name), null);                    for (Iterator i=list.iterator(); i.hasNext(); ) {                        ((ServiceListener) i.next()).serviceRemoved(event);                    }                }            }        }    }