Class PatternRuleMatcher

  • All Implemented Interfaces:
    RuleMatcher

    final class PatternRuleMatcher
    extends java.lang.Object
    implements RuleMatcher
    Since:
    3.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String namespaceURI  
      private java.lang.String pattern  
    • Constructor Summary

      Constructors 
      Constructor Description
      PatternRuleMatcher​(java.lang.String pattern)  
      PatternRuleMatcher​(java.lang.String pattern, java.lang.String namespaceURI)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getNamespaceURI()  
      java.lang.String getPattern()  
      int hashCode()
      boolean match​(java.lang.String namespace, java.lang.String pattern, java.lang.String name, org.xml.sax.Attributes attributes)
      Use the specified parameter to perform a test.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • pattern

        private final java.lang.String pattern
      • namespaceURI

        private java.lang.String namespaceURI
    • Constructor Detail

      • PatternRuleMatcher

        public PatternRuleMatcher​(java.lang.String pattern)
      • PatternRuleMatcher

        public PatternRuleMatcher​(java.lang.String pattern,
                                  java.lang.String namespaceURI)
    • Method Detail

      • match

        public boolean match​(java.lang.String namespace,
                             java.lang.String pattern,
                             java.lang.String name,
                             org.xml.sax.Attributes attributes)
        Use the specified parameter to perform a test.
        Specified by:
        match in interface RuleMatcher
        Parameters:
        namespace - the namespace URI of the matching element, or an empty string if the parser is not namespace aware or the element has no namespace
        pattern - Nesting pattern to be matched for this Rule
        name - the local name if the parser is namespace aware, or just the element name otherwise
        attributes - The attribute list of this element
        Returns:
        true, if the test succeeds, false otherwise
      • getPattern

        public java.lang.String getPattern()
      • getNamespaceURI

        public java.lang.String getNamespaceURI()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object