1 8 9 package net.sourceforge.chaperon.model; 10 11 import java.util.Vector ; 12 13 19 public class Violations 20 { 21 private Vector violations = new Vector (); 22 23 28 public void addViolation(Violation violation) 29 { 30 if (violation!=null) 31 violations.addElement(violation); 32 } 33 34 40 public void addViolation(String message, String location) 41 { 42 violations.addElement(new Violation(message, location)); 43 } 44 45 50 public void addViolations(Violations violations) 51 { 52 if (violations!=null) 53 this.violations.addAll(violations.violations); 54 } 55 56 63 public Violation getViolation(int index) 64 { 65 return (Violation)violations.elementAt(index); 66 } 67 68 73 public int getViolationCount() 74 { 75 return violations.size(); 76 } 77 } 78 | Popular Tags |