Class CountingPathVisitor

    • Constructor Detail

      • CountingPathVisitor

        public CountingPathVisitor​(Counters.PathCounters pathCounter)
        Constructs a new instance.
        Parameters:
        pathCounter - How to count path visits.
    • 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
      • toString

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

        protected void updateFileCounters​(java.nio.file.Path file,
                                          java.nio.file.attribute.BasicFileAttributes attributes)
        Updates the counters for visiting the given file.
        Parameters:
        file - the visited file.
        attributes - the visited file attributes.
      • 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