Class UnionQNameTest

java.lang.Object
net.sf.saxon.pattern.UnionQNameTest
All Implemented Interfaces:
QNameTest

public class UnionQNameTest extends Object implements QNameTest
A QNameTest that is the union of a number of supplied QNameTests
  • Constructor Details

    • UnionQNameTest

      public UnionQNameTest(List<QNameTest> tests)
    • UnionQNameTest

      public UnionQNameTest(QNameTest... test)
  • Method Details

    • getTests

      public Set<QNameTest> getTests()
    • matches

      public boolean matches(StructuredQName qname)
      Test whether the QNameTest matches a given QName
      Specified by:
      matches in interface QNameTest
      Parameters:
      qname - the QName to be matched
      Returns:
      true if the name matches, false if not
    • toString

      public String toString()
      The toString() method defines the format used in a package export, so it must be re-parseable
      Overrides:
      toString in class Object
      Returns:
      a string representation: the individual qname tests, separated by vertical bar
    • exportQNameTest

      public String exportQNameTest()
      Export the QNameTest as a string for use in a SEF file (typically in a catch clause).
      Specified by:
      exportQNameTest in interface QNameTest
      Returns:
      a string representation of the QNameTest, suitable for use in export files. The format is a sequence of alternatives separated by spaces, where each alternative is one of '*', '*:localname', 'Q{uri}*', or 'Q{uri}local'.
    • relationship

      public Affinity relationship(QNameTest other)
      Description copied from interface: QNameTest
      Determine the relationship of this QNameTest to another QNameTest: one of (same, subsumes, subsumed-by, overlaps, disjoint)
      Specified by:
      relationship in interface QNameTest
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object