com.sun.msv.grammar
Class NotNameClass

java.lang.Object
  |
  +--com.sun.msv.grammar.NameClass
        |
        +--com.sun.msv.grammar.NotNameClass
All Implemented Interfaces:
Serializable

public final class NotNameClass
extends NameClass

NameClass that acts a not operator. Actually, A NotNameClass can be represented by using a DifferenceNameClass and AnyNameClass.

Author:
Kohsuke KAWAGUCHI
See Also:
Serialized Form

Field Summary
 NameClass child
           
 
Fields inherited from class com.sun.msv.grammar.NameClass
LOCALNAME_WILDCARD, NAMESPACE_WILDCARD
 
Constructor Summary
NotNameClass(NameClass child)
           
 
Method Summary
 boolean accepts(String namespaceURI, String localName)
          accepts a name if it is not accepted by the child name class.
 String toString()
           
 Object visit(NameClassVisitor visitor)
          visitor pattern support
 
Methods inherited from class com.sun.msv.grammar.NameClass
accepts
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

child

public final NameClass child
Constructor Detail

NotNameClass

public NotNameClass(NameClass child)
Method Detail

accepts

public boolean accepts(String namespaceURI,
                       String localName)
accepts a name if it is not accepted by the child name class.
Overrides:
accepts in class NameClass
Following copied from class: com.sun.msv.grammar.NameClass
Parameters:
namespaceURI - namespace URI to be tested. If this value equals to NAMESPACE_WILDCARD, implementation must assume that valid namespace is specified. this twist will be used for error diagnosis.
localName - local part to be tested. As with namespaceURI, LOCALNAME_WILDCARD will acts as a wild card.
Returns:
true if the pair is accepted, false otherwise.

visit

public Object visit(NameClassVisitor visitor)
Description copied from class: NameClass
visitor pattern support
Overrides:
visit in class NameClass

toString

public String toString()
Overrides:
toString in class Object