pointer = 0; found = false; for (index = 0; index < listenerList.length - 2; index += 2) { checkClass = (Class) listenerList[index]; checkListener = (EventListener) listenerList[index + 1]; if (checkClass.equals(t) == false || checkListener.equals(listener) == false) { list[pointer] = checkClass; list[pointer + 1] = checkListener; pointer += 2; } else { found = true; } }   if (found == true) { listenerList = list; }  }
oldList = listenerList; oldLength = oldList.length; for (int i = 0; i < oldLength; i += 2) if (oldList[i] == t && oldList[i + 1] == listener) { if (oldLength == 2) newList = NO_LISTENERS; else { newList = new Object[oldLength - 2]; if (i > 0) System.arraycopy(oldList, 0, newList, 0, i); if (i < oldLength - 2) System.arraycopy(oldList, i + 2, newList, i, oldLength - 2 - i); } listenerList = newList; return; } }
	public void remove(Class t, EventListener listener) {		// Variables		Object[]		list;		int				index;		Class			checkClass;		EventListener	checkListener;		int				pointer;		boolean			found;		// Create New list in anticipation that listener is not present		if (listenerList.length == 0) {			return;		} // if		list = new Object[listenerList.length - 2];		// Search through list looking for listener		pointer = 0;		found = false;		for (index = 0; index < listenerList.length - 2; index += 2) {			checkClass = (Class) listenerList[index];			checkListener = (EventListener) listenerList[index + 1];			if (checkClass.equals(t) == false ||				checkListener.equals(listener) == false) {				list[pointer] = checkClass;				list[pointer + 1] = checkListener;				pointer += 2;			} else {				found = true;			} // if		} // for		// Replace Listener List		if (found == true) {			listenerList = list;		} // if	} // remove()