001 package com.thaiopensource.relaxng.impl;
002
003 class NotAllowedPattern extends Pattern {
004 NotAllowedPattern() {
005 super(false, EMPTY_CONTENT_TYPE, NOT_ALLOWED_HASH_CODE);
006 }
007 boolean isNotAllowed() {
008 return true;
009 }
010 boolean samePattern(Pattern other) {
011 // needs to work for UnexpandedNotAllowedPattern
012 return other.getClass() == this.getClass();
013 }
014 void accept(PatternVisitor visitor) {
015 visitor.visitNotAllowed();
016 }
017 Object apply(PatternFunction f) {
018 return f.caseNotAllowed(this);
019 }
020 }