Class CountingPathVisitor

    • Constructor Detail

      • CountingPathVisitor

        public CountingPathVisitor​(Counters.PathCounters pathCounter)
        Constructs a new instance.
        Parameters:
        pathCounter - How to count path visits.
      • CountingPathVisitor

        public CountingPathVisitor​(Counters.PathCounters pathCounter,
                                   PathFilter fileFilter,
                                   PathFilter dirFilter)
        Constructs a new instance.
        Parameters:
        pathCounter - How to count path visits.
        fileFilter - Filters which files to count.
        dirFilter - Filters which directories to count.
        Since:
        2.9.0
    • Method Detail

      • equals

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

        public Counters.PathCounters getPathCounters()
        Gets the visitation counts.
        Returns:
        the visitation counts.
      • hashCode

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

        public java.nio.file.FileVisitResult postVisitDirectory​(java.nio.file.Path dir,
                                                                java.io.IOException exc)
                                                         throws java.io.IOException
        Specified by:
        postVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Overrides:
        postVisitDirectory in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException
      • preVisitDirectory

        public java.nio.file.FileVisitResult preVisitDirectory​(java.nio.file.Path dir,
                                                               java.nio.file.attribute.BasicFileAttributes attributes)
                                                        throws java.io.IOException
        Specified by:
        preVisitDirectory in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Overrides:
        preVisitDirectory in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException
      • toString

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

        public java.nio.file.FileVisitResult visitFile​(java.nio.file.Path file,
                                                       java.nio.file.attribute.BasicFileAttributes attributes)
                                                throws java.io.IOException
        Specified by:
        visitFile in interface java.nio.file.FileVisitor<java.nio.file.Path>
        Overrides:
        visitFile in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>
        Throws:
        java.io.IOException