01: package org.kohsuke.rngom.digested;
02:
03: /**
04: * <choice> pattern.
05: *
06: * @author Kohsuke Kawaguchi (kk@kohsuke.org)
07: */
08: public class DChoicePattern extends DContainerPattern {
09: public boolean isNullable() {
10: for (DPattern p = firstChild(); p != null; p = p.next)
11: if (p.isNullable())
12: return true;
13: return false;
14: }
15:
16: public <V> V accept(DPatternVisitor<V> visitor) {
17: return visitor.onChoice(this);
18: }
19: }
|