# com.bea.xml
QNameSetBuilder Class

public class QNameSetBuilder
extends `Object`
implements `QNameSetSpecification`, `Serializable`

Used to build `QNameSet```.

Hierarchy
  `Object`
  `QNameSetBuilder`

All Implemented Interfaces
  `QNameSetSpecification`, `Serializable`

## Constructor Summary

QNameSetBuilder() Constructs an empty QNameSetBuilder.
QNameSetBuilder(`QNameSetSpecification` set) Constructs a QNameSetBuilder whose initial contents are given by another QNameSetSpecification.
QNameSetBuilder(`String` str, `String` targetURI) Constructs a QNameSetBuilder whose initial contents are given as a list of namespace URIs, using the same format used by wildcards in XSD files.
QNameSetBuilder(`Set` excludedURIs, `Set` includedURIs, `Set` excludedQNamesInIncludedURIs, `Set` includedQNamesInExcludedURIs) Constructs a QNameSetBuilder whose inital contents are given by the four sets.

## Method Summary

`public void` | `add`(`QName` qname) Adds a single QName to this QNameSetBuilder.
`public void` | `addAll`(`QNameSetSpecification` set) Adds the contents of another QNameSet to this QNameSetBuilder.
`public void` | `addNamespace`(`String` uri) Adds an entire namespace URI of QNames to this QNameSetBuilder.
`public void` | `clear`() Clears this QNameSetBuilder
`public boolean` | `contains`(`QName` name) True if this ModelTransitionSet contains the given qname.
`public boolean` | `containsAll`(`QNameSetSpecification` set) True if the parameter is a subset of this set.
`public `Set`` | `excludedQNamesInIncludedURIs`() The finite set of QNames that are excluded from the set within namespaces that are otherwise included.
`public `Set`` | `excludedURIs`() The finite set of namespace URIs that are almost completely excluded from the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions).
`public `Set`` | `includedQNamesInExcludedURIs`() The finite set of QNames that are included in the set within namespaces that are otherwise excluded.
`public `Set`` | `includedURIs`() The finite set of namespace URIs that are almost completely included in the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions).
`public `QNameSet`` | `intersect`(`QNameSetSpecification` set) Returns a new QNameSet that is the intersection of this one and another.
`public `QNameSet`` | `inverse`() Returns a new QNameSet that is the inverse of this one.
`public void` | `invert`() Inverts this QNameSetBuilder.
`public boolean` | `isAll`() True if this ModelTransitionSet contains all QNames.
`public boolean` | `isDisjoint`(`QNameSetSpecification` set) True if the given set is disjoint from this one.
`public boolean` | `isEmpty`() True if this ModelTransitionSet contains no QNames.
`public void` | `remove`(`QName` qname) Removes the given qname from this QNameSetBuilder.
`public void` | `removeAll`(`QNameSetSpecification` set) Removes all contents of a given QNameSet from this QNameSetBuilder.
`public void` | `removeNamespace`(`String` uri) Removes an entire namespace URI from this QNameSetBuilder.
`public void` | `restrict`(`QNameSetSpecification` set) Restricts the contents of this QNameSetBuilder to be a subset of the given QNameSet.
`public `QNameSet`` | `toQNameSet`() Returns a `QNameSet``` equivalent to the current state of this QNameSetBuilder.
`public `String`` | `toString`() Returns a string representation useful for debugging, subject to change.
`public `QNameSet`` | `union`(`QNameSetSpecification` set) Returns a new QNameSet that is the union of this one and another.

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods from interface `com.bea.xml.`QNameSetSpecification``
``contains`, `containsAll`, `excludedQNamesInIncludedURIs`, `excludedURIs`, `includedQNamesInExcludedURIs`, `includedURIs`, `intersect`, `inverse`, `isAll`, `isDisjoint`, `isEmpty`, `union``

## Constructor Detail

### QNameSetBuilder

    public QNameSetBuilder()

  Constructs an empty QNameSetBuilder.

### QNameSetBuilder

    public QNameSetBuilder(QNameSetSpecification set)

  Constructs a QNameSetBuilder whose initial contents are given by another QNameSetSpecification.

### QNameSetBuilder

    public QNameSetBuilder(String str,
                           String targetURI)

  Constructs a QNameSetBuilder whose initial contents are given as a list of namespace URIs, using the same format used by wildcards in XSD files.

### QNameSetBuilder

    public QNameSetBuilder(Set excludedURIs,
                           Set includedURIs,
                           Set excludedQNamesInIncludedURIs,
                           Set includedQNamesInExcludedURIs)

  Constructs a QNameSetBuilder whose inital contents are given by the four sets. Exactly one of either excludedURIs or includedURIs must be non-null.

## Method Detail

### add(QName) Method

    public void add(QName qname)

Adds a single QName to this QNameSetBuilder.

### addAll(QNameSetSpecification) Method

    public void addAll(QNameSetSpecification set)

Adds the contents of another QNameSet to this QNameSetBuilder.

### addNamespace(String) Method

    public void addNamespace(String uri)

Adds an entire namespace URI of QNames to this QNameSetBuilder. The empty string is used to signifiy the (local) no-namespace.

### clear() Method

    public void clear()

Clears this QNameSetBuilder

### contains(QName) Method

    public boolean contains(QName name)

True if this ModelTransitionSet contains the given qname.

### containsAll(QNameSetSpecification) Method

    public boolean containsAll(QNameSetSpecification set)

True if the parameter is a subset of this set.

### excludedQNamesInIncludedURIs() Method

    public Set excludedQNamesInIncludedURIs()

Description copied from `QNameSetSpecification.excludedQNamesInIncludedURIs()`
The finite set of QNames that are excluded from the set within namespaces that are otherwise included. Should only contain QNames within namespace that are within the set includedURIs() (or any URI, if includedURIs() is null, which means that all URIs are almost completely included).

Never null.

The same set as inverse().includedQNames().

### excludedURIs() Method

    public Set excludedURIs()

Description copied from `QNameSetSpecification.excludedURIs()`
The finite set of namespace URIs that are almost completely excluded from the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions). Null if the set of namespaceURIs that are almost completely included is infinite.

Null (meaning almost all URIs excluded) if includedURIs() is non-null; non-null otherwise.

The same set as inverse().includedURIs().

### includedQNamesInExcludedURIs() Method

    public Set includedQNamesInExcludedURIs()

Description copied from `QNameSetSpecification.includedQNamesInExcludedURIs()`
The finite set of QNames that are included in the set within namespaces that are otherwise excluded. Should only contain QNames within namespace that are within the set excludedURIs() (or any URI, if excludedURIs() is null, which means that all URIs are almost completely excluded).

Never null.

The same as inverse().excludedQNames().

### includedURIs() Method

    public Set includedURIs()

Description copied from `QNameSetSpecification.includedURIs()`
The finite set of namespace URIs that are almost completely included in the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions). Null if the set of namespaceURIs that are almost completely included is infinite.

Null (meaning almost all URIs included) if excludedURIs() is non-null; non-null otherwise.

The same as inverse.excludedURIs().

### intersect(QNameSetSpecification) Method

    public QNameSet intersect(QNameSetSpecification set)

Returns a new QNameSet that is the intersection of this one and another.

### inverse() Method

    public QNameSet inverse()

Returns a new QNameSet that is the inverse of this one.

### invert() Method

    public void invert()

Inverts this QNameSetBuilder.

### isAll() Method

    public boolean isAll()

True if this ModelTransitionSet contains all QNames.

### isDisjoint(QNameSetSpecification) Method

    public boolean isDisjoint(QNameSetSpecification set)

True if the given set is disjoint from this one.

### isEmpty() Method

    public boolean isEmpty()

True if this ModelTransitionSet contains no QNames.

### remove(QName) Method

    public void remove(QName qname)

Removes the given qname from this QNameSetBuilder.

### removeAll(QNameSetSpecification) Method

    public void removeAll(QNameSetSpecification set)

Removes all contents of a given QNameSet from this QNameSetBuilder.

### removeNamespace(String) Method

    public void removeNamespace(String uri)

Removes an entire namespace URI from this QNameSetBuilder.

### restrict(QNameSetSpecification) Method

    public void restrict(QNameSetSpecification set)

Restricts the contents of this QNameSetBuilder to be a subset of the given QNameSet. In other words, computes an intersection.

### toQNameSet() Method

    public QNameSet toQNameSet()

Returns a `QNameSet``` equivalent to the current state of this QNameSetBuilder.

### toString() Method

    public String toString()

Returns a string representation useful for debugging, subject to change.

Overrides
  `Object.toString()`

### union(QNameSetSpecification) Method

    public QNameSet union(QNameSetSpecification set)

Returns a new QNameSet that is the union of this one and another.