Code example for Vector

Methods: addElement, contains

0
	 * Adds a listener who is interested in receiving an update whenever 
	 * this class's properties change. 
	 * @param listener A class implementing ChangeListener.  
	 */ 
	public void addChangeListener(ChangeListener listener) {
		if(!listeners.contains(listener)) {
			listeners.addElement(listener);
		} 
	} 
	 
	/** 
	 * 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.