package org.apache.struts.util; import java.util.Vector; public class ErrorMessages { private Vector errors = new Vector(); public void addError(String key) { this.errors.addElement(key); } public String getError(int index) { return this.errors.elementAt(index); } public String[] getErrors() { if (this.errors.size() > 0) { String[] array = new String[this.errors.size()]; this.errors.copyInto((Object[])array); return array; } return null; } public int getSize() { return this.errors.size(); } }