Code example for Vector

Methods: removeAllElements

0
 
public class TagWriterFactory { 
	private static Vector TAGWRITERS = new Vector();
 
	public static void removeAllTagExtractors() { 
		TagWriterFactory.TAGWRITERS.removeAllElements();
	} 
	 
	public static void addTagWriter(ITagWriter _tagWriter) {
		TagWriterFactory.TAGWRITERS.addElement(_tagWriter);
	} 
 
	public static ITagWriter createTagWriter(IFIDNode _node) throws IOException {
		ITagWriter matchingTagWriter = null;
		 
		Enumeration tagExtractorsEnum = TagWriterFactory.TAGWRITERS.elements();
		while (matchingTagWriter== null && tagExtractorsEnum.hasMoreElements()) {
			ITagWriter tagWriter = (ITagWriter)tagExtractorsEnum.nextElement();
			if (tagWriter.isTagWriterFor(_node)) {
				matchingTagWriter = tagWriter;
			}