01: /* $Id: ValidationEvent.java 768 2006-12-05 14:55:00Z hengels $ */
02: package org.conform;
03:
04: import java.util.*;
05:
06: /**
07: * @version $Revision: 768 $
08: */
09: public class ValidationEvent extends EventObject {
10: Set<Issue> issues = new HashSet<Issue>();
11:
12: public ValidationEvent(Object source) {
13: super (source);
14: }
15:
16: public ValidationEvent(Object source, Issue issue) {
17: super (source);
18: addIssue(issue);
19: }
20:
21: void addIssues(Collection<Issue> issues) {
22: this .issues.addAll(issues);
23: }
24:
25: void addIssue(Issue issue) {
26: issues.add(issue);
27: }
28:
29: public Collection<Issue> getIssues() {
30: return issues;
31: }
32:
33: public String toString() {
34: return "ValidationEvent{" + "issues=" + issues + '}';
35: }
36: }
|