for (int i = 0; i < nListeners; i++) { if (listeners[i].listener != listener) { continue; } if (listeners[i].useCapture != useCapture) { continue; } if (!listeners[i].type.equals(type)) { continue; }  if (nListeners == 1) { listeners = null; nListeners = 0; } else { for (int j = i + 1; j < nListeners; j++) { listeners[i++] = listeners[j++]; } listeners[--nListeners] = null; } break; }
listeners.remove(new ListenerRecord(type, listener, useCapture)); nListeners = listeners.size();
  public final void removeEventListener(String type,                                        EventListener listener,                                        boolean useCapture)  {    for (int i = 0; i < nListeners; i++)      {        if (listeners[i].listener != listener)          {            continue;          }        if (listeners[i].useCapture != useCapture)          {            continue;          }        if (!listeners[i].type.equals(type))          {            continue;          }        if (nListeners == 1)          {            listeners = null;            nListeners = 0;          }        else          {            for (int j = i + 1; j < nListeners; j++)              {                listeners[i++] = listeners[j++];              }            listeners[--nListeners] = null;          }        break;      }    // no exceptions reported  }