1 8 9 package net.sourceforge.chaperon.model.extended; 10 11 import net.sourceforge.chaperon.model.Violations; 12 13 19 public class Sequence extends PatternList 20 { 21 24 public Sequence() {} 25 26 33 public Object clone() throws CloneNotSupportedException 34 { 35 Sequence clone = new Sequence(); 36 37 for (int i = 0; i<getPatternCount(); i++) 38 clone.addPattern((Pattern)getPattern(i).clone()); 39 40 return clone; 41 } 42 43 48 public Violations validate() 49 { 50 Violations violations = new Violations(); 51 52 55 for (int i = 0; i<getPatternCount(); i++) 56 violations.addViolations(getPattern(i).validate()); 57 58 return violations; 59 } 60 } 61 | Popular Tags |