public final class QNameSet extends Object implements QNameSetSpecification, Serializable
Notice that a finite set of QNames is a degenerate case of the first category outlined above:
QNameSetBuilder
,
Serialized FormModifier and Type | Field and Description |
---|---|
static QNameSet |
ALL
The QNameSet containing all QNames.
|
static QNameSet |
EMPTY
The empty QNameSet.
|
static QNameSet |
LOCAL
The QNameSet containing all QNames in the local (no-)namespace.
|
static QNameSet |
NONLOCAL
The QNameSet containing all QNames except for those in the local (no-)namespace.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(QName name)
True if this ModelTransitionSet contains the given qname.
|
boolean |
containsAll(QNameSetSpecification set)
True if the given set is a subset of this one.
|
Set<QName> |
excludedQNamesInIncludedURIs()
The set of QNames excluded from the set even though they are within
a namespace that is otherwise fully included in the set.
|
Set<String> |
excludedURIs()
Namespaces that are fully excluded from the set except for a finite
number of individual QName exceptions.
|
static QNameSet |
forArray(QName[] includedQNames)
Returns a QNameSet based on the given array of included QNames
|
static QNameSet |
forSets(Set<String> excludedURIs,
Set<String> includedURIs,
Set<QName> excludedQNamesInIncludedURIs,
Set<QName> includedQNamesInExcludedURIs)
Returns a QNameSet based on the given sets of excluded URIs,
included URIs, excluded QNames in included namespaces, and included
QNames in excluded namespaces.
|
static QNameSet |
forSpecification(QNameSetSpecification spec)
Returns a QNameSet with the same contents as the given
QNameSetSpecification.
|
static QNameSet |
forWildcardNamespaceString(String wildcard,
String targetURI)
Returns a QNameSet corresponding to the given wildcard namespace string.
|
Set<QName> |
includedQNamesInExcludedURIs()
The set of QNames included in the set even though they are within
a namespace that is otherwise fully included in the set.
|
Set<String> |
includedURIs()
Namespaces that are fully included in set except for a finite
number of individual QName exceptions.
|
QNameSet |
intersect(QNameSetSpecification set)
Returns a new QNameSet that is the intersection of this one and another.
|
QNameSet |
inverse()
Returns a new QNameSet that is the inverse of this one.
|
boolean |
isAll()
True if this ModelTransitionSet contains all QNames.
|
boolean |
isDisjoint(QNameSetSpecification set)
True if the given set is disjoint from this one.
|
boolean |
isEmpty()
True if this ModelTransitionSet contains no QNames.
|
static QNameSet |
singleton(QName name)
Returns a QNameSet containing only the given QName.
|
String |
toString()
Returns a string representation useful for debugging, subject to change.
|
QNameSet |
union(QNameSetSpecification set)
Returns a new QNameSet that is the union of this one and another.
|
public static final QNameSet EMPTY
public static final QNameSet ALL
public static final QNameSet LOCAL
public static final QNameSet NONLOCAL
public static QNameSet forSets(Set<String> excludedURIs, Set<String> includedURIs, Set<QName> excludedQNamesInIncludedURIs, Set<QName> includedQNamesInExcludedURIs)
excludedURIs
- the finite set of namespace URI strings to exclude from the set, or null if this set is infiniteincludedURIs
- the finite set of namespace URI strings to include in the set, or null if this set is infiniteexcludedQNamesInIncludedURIs
- the finite set of exceptional QNames to exclude from the included namespacesincludedQNamesInExcludedURIs
- the finite set of exceptional QNames to include that are in the excluded namespacespublic static QNameSet forArray(QName[] includedQNames)
includedQNames
- the array of included QNamespublic static QNameSet forSpecification(QNameSetSpecification spec)
public static QNameSet forWildcardNamespaceString(String wildcard, String targetURI)
public static QNameSet singleton(QName name)
public boolean contains(QName name)
contains
in interface QNameSetSpecification
public boolean isAll()
isAll
in interface QNameSetSpecification
public boolean isEmpty()
isEmpty
in interface QNameSetSpecification
public QNameSet intersect(QNameSetSpecification set)
intersect
in interface QNameSetSpecification
set
- the set to insersect withpublic QNameSet union(QNameSetSpecification set)
union
in interface QNameSetSpecification
set
- the set to union withpublic QNameSet inverse()
inverse
in interface QNameSetSpecification
public boolean containsAll(QNameSetSpecification set)
containsAll
in interface QNameSetSpecification
set
- the set to testpublic boolean isDisjoint(QNameSetSpecification set)
isDisjoint
in interface QNameSetSpecification
set
- the set to testpublic Set<String> excludedURIs()
excludedURIs
in interface QNameSetSpecification
public Set<String> includedURIs()
includedURIs
in interface QNameSetSpecification
public Set<QName> excludedQNamesInIncludedURIs()
excludedQNamesInIncludedURIs
in interface QNameSetSpecification
public Set<QName> includedQNamesInExcludedURIs()
includedQNamesInExcludedURIs
in interface QNameSetSpecification