Interface ObjectWalk.VisitationPolicy

  • Enclosing class:
    ObjectWalk

    public static interface ObjectWalk.VisitationPolicy
    When walking over a tree and blob graph, objects are usually marked as seen as they are visited and this "seen" status is checked upon the next visit. If they are already "seen" then they are not processed (returned by ObjectWalk.nextObject()) again. However, this behavior can be overridden by supplying a different implementation of this class.
    Since:
    5.4
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean shouldVisit​(RevObject o)
      Whenever the rev or object walk reaches a Git object, if that object already exists as a RevObject, this method is called to determine if that object should be visited.
      void visited​(RevObject o)
      Called when an object is visited.
    • Method Detail

      • shouldVisit

        boolean shouldVisit​(RevObject o)
        Whenever the rev or object walk reaches a Git object, if that object already exists as a RevObject, this method is called to determine if that object should be visited.
        Parameters:
        o - the object to check if it should be visited
        Returns:
        true if the object should be visited
      • visited

        void visited​(RevObject o)
        Called when an object is visited.
        Parameters:
        o - the object that was visited