code: public DependencyPath next() {
          if (next == null)
              throw new NoSuchElementException("No further paths to return");
          DependencyPath p = next;
          advance();
          return p;
      }
docs: Returns the next path that meets the requirements.
  
  @throws NoSuchElementException if called when no further paths exist