public RListener get (Cons cons) { if (_wref != null) { RListener listener = _wref.get(); if (listener != null) return listener; cons.close(); // close will defang() us } return _noop; } }
static Cons insert (Cons head, Cons cons) { if (head == null) { return cons; } else if (cons._priority > head._priority) { cons.next = head; return cons; } else { head.next = insert(head.next, cons); return head; } }
static Cons remove (Cons head, Cons cons) { if (head == null) return head; if (head == cons) return head.next; head.next = remove(head.next, cons); return head; }
public void run () { _listeners = Cons.removeAll(_listeners, listener); connectionRemoved(); } });
protected synchronized Cons addConnection (RListener listener) { if (listener == null) throw new NullPointerException("Null listener"); return addCons(new Cons(this, listener)); }
static Cons remove (Cons head, Cons cons) { if (head == null) return head; if (head == cons) return head.next; head.next = remove(head.next, cons); return head; }
public void run () { _listeners = Cons.removeAll(_listeners, listener); connectionRemoved(); } });
protected synchronized Cons addConnection (RListener listener) { if (listener == null) throw new NullPointerException("Null listener"); return addCons(new Cons(this, listener)); }
public void run () { _listeners = Cons.remove(_listeners, cons); connectionRemoved(); } });
static Cons insert (Cons head, Cons cons) { if (head == null) { return cons; } else if (cons._priority > head._priority) { cons.next = head; return cons; } else { head.next = insert(head.next, cons); return head; } }
protected synchronized void removeConnection (final RListener listener) { if (isDispatching()) { _pendingRuns = append(_pendingRuns, new Runs() { public void run () { _listeners = Cons.removeAll(_listeners, listener); connectionRemoved(); } }); } else { _listeners = Cons.removeAll(_listeners, listener); connectionRemoved(); } }
public RListener get (Cons cons) { if (_wref != null) { RListener listener = _wref.get(); if (listener != null) return listener; cons.close(); // close will defang() us } return _noop; } }
public void run () { _listeners = Cons.remove(_listeners, cons); connectionRemoved(); } });
public void run () { _listeners = Cons.insert(_listeners, cons); connectionAdded(); } });