public abstract class NameClass extends Object implements ParsedNameClass, Serializable
QName
s.Modifier and Type | Field and Description |
---|---|
static NameClass |
ANY
Sigleton instance that represents "anyName".
|
static NameClass |
NULL
Sigleton instance that accepts no name.
|
Constructor and Description |
---|
NameClass() |
Modifier and Type | Method and Description |
---|---|
abstract <V> V |
accept(NameClassVisitor<V> visitor)
Visitor pattern support.
|
abstract boolean |
contains(QName name)
Returns true if the given
QName is a valid name
for this QName. |
abstract int |
containsSpecificity(QName name) |
boolean |
hasOverlapWith(NameClass nc2)
Returns true if the intersection between this name class
and the specified name class is non-empty.
|
abstract boolean |
isOpen()
Returns true if the name class accepts infinite number of
QName s. |
Set<QName> |
listNames()
If the name class is closed (IOW !
isOpen() ),
return the set of names in this name class. |
public static final NameClass ANY
public static final NameClass NULL
This instance is useful when doing boolean arithmetic over name classes (such as computing an inverse of a given name class, etc), even though it can never appear in a RELAX NG surface syntax.
Internally, this instance is also used for:
public abstract boolean contains(QName name)
QName
is a valid name
for this QName.public abstract int containsSpecificity(QName name)
public abstract <V> V accept(NameClassVisitor<V> visitor)
public abstract boolean isOpen()
QName
s.
Intuitively, this method returns true if the name class is some sort of wildcard.
public Set<QName> listNames()
isOpen()
),
return the set of names in this name class. Otherwise the behavior
is undefined.public final boolean hasOverlapWith(NameClass nc2)
Copyright © 2017 JBoss by Red Hat. All rights reserved.