Code example for Vector

Methods: removeElement

0
	 * Removes the given listener from the list of objects who 
	 * receive notifications about changes to this object. 
	 * @param listener The object that no longer wishes to receive updates. 
	 */ 
	public void removeChangeListener(ChangeListener listener) {
		listeners.removeElement(listener);
	} 
	 
	/** 
	 * Notifies listeners that something has changed. 
	 * This can be triggered by the object itself. 
	 */ 
	@SuppressWarnings({ "unchecked" }) 
	protected void notifyListeners() { 
		//create a copy to prevent modifications of the vector state from crashing the program 
		Vector<ChangeListener> copyOfListeners = 
			(Vector<ChangeListener>)(listeners.clone());
		ChangeEvent event = new ChangeEvent(this);
		Enumeration<ChangeListener> enum1 = copyOfListeners.elements();
		while(enum1.hasMoreElements()) {
			ChangeListener listener = enum1.nextElement();