Class RegexNodeScanner

  • All Implemented Interfaces:
    NodeScanner

    public class RegexNodeScanner
    extends Object
    implements NodeScanner
    NodeScanner implementation that scans the document to find nodes that match certain regex patterns.
    Author:
    Alfonso Vásquez
    • Field Detail

      • patterns

        protected Pattern[] patterns
      • matchEntireNodeText

        protected boolean matchEntireNodeText
    • Constructor Detail

      • RegexNodeScanner

        public RegexNodeScanner()
    • Method Detail

      • setPatterns

        public void setPatterns​(Pattern... patterns)
      • setMatchEntireNodeText

        public void setMatchEntireNodeText​(boolean matchEntireNodeText)
      • scan

        public List<org.dom4j.Node> scan​(org.dom4j.Document document)
        Description copied from interface: NodeScanner
        Scans the specified document for nodes that fit a certain condition.
        Specified by:
        scan in interface NodeScanner
        Returns:
        the list of nodes that fit the condition
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object