public String toString() { String res; res = getClass().getName() + " {\n"; Enumeration cur = elements(); while (cur.hasMoreElements()) { CheckItem item = (CheckItem) cur.nextElement(); res += " " + item.toString() + "\n"; } res += " }"; return res; }