def generate(self, groups='all', sort=None):
        groups_to_generate = list()
        if type(groups) is list:
            groups_to_generate = groups
        elif type(groups) is str:
            groups_to_generate.append(groups)

        links = []
        for rule in current_app.url_map.iter_rules():

            if rule.endpoint == 'static':
                continue

            func = current_app.view_functions[rule.endpoint]
            arguments = rule.arguments if rule.arguments else ['None']
            func_groups = self.func_groups[func]
            func_props = self.func_props[func] if func in self.func_props \
                else {}
            location = self.func_locations.get(func, None)

            if func_groups.intersection(groups_to_generate):
                props = dict(
                    methods=rule.methods,
                    rule="%s" % rule,
                    endpoint=rule.endpoint,
                    docstring=func.__doc__,
                    args=arguments,
                    defaults=rule.defaults,
                    location=location,
                )
                for p in func_props:
                    if p not in self.immutable_props:
                        props[p] = func_props[p]
                links.append(props)
        if sort:
            return sort(links)
        else:
            return sorted(links, key=itemgetter('rule'))
:return: True if there has next node, or False
dataset/ETHPy150Open acoomans/flask-autodoc/flask_autodoc/autodoc.py/Autodoc.generate--crossover with--dataset/ETHPy150Open algorhythms/LintCode/Implement Iterator of Binary Search Tree.py/Solution.hasNext