public static boolean transitiveClosureIteratorDnextP(TransitiveClosureIterator self) {
    { Stella_Object node = self.value;
      Iterator adjacencyiterator = ((Iterator)(edu.isi.stella.javalib.Native.funcall(self.allocateAdjacencyIteratorFunction, null, new java.lang.Object [] {node})));

      if (adjacencyiterator != null) {
        self.adjacencyIteratorStack = Cons.cons(adjacencyiterator, self.adjacencyIteratorStack);
      }
      else {
        {
          adjacencyiterator = ((Iterator)(self.adjacencyIteratorStack.value));
          if (adjacencyiterator == null) {
            return (false);
          }
        }
      }
      for (;;) {
        while (!adjacencyiterator.nextP()) {
          self.adjacencyIteratorStack = self.adjacencyIteratorStack.rest;
          adjacencyiterator = ((Iterator)(self.adjacencyIteratorStack.value));
          if (adjacencyiterator == null) {
            return (false);
          }
        }
        node = adjacencyiterator.value;
        if ((!self.beenThereList.memberP(node)) &&
            ((self.filterP == null) ||
             ((Boolean)(edu.isi.stella.javalib.Native.funcall(self.filterP, null, new java.lang.Object [] {node}))).booleanValue())) {
          self.beenThereList = Cons.cons(node, self.beenThereList);
          self.value = node;
          return (true);
        }
      }
    }
  }