Class DAGIterator<T>

  • All Implemented Interfaces:
    Iterable<T>, Iterator<T>

    public abstract class DAGIterator<T>
    extends Object
    implements Iterator<T>, Iterable<T>
    Iterator for directed acyclic graph
    Author:
    dmitry.neverov
    • Constructor Detail

      • DAGIterator

        public DAGIterator()
    • Method Detail

      • markStart

        public abstract void markStart​(@NotNull
                                       T node)
        Mark node from which to start an iteration
        Parameters:
        node - node of interest
      • markStart

        public abstract void markStart​(@NotNull
                                       Collection<T> nodes)
        Mark nodes from which to start an iteration
        Parameters:
        nodes - nodes of interest
      • markUninteresting

        public abstract void markUninteresting​(@NotNull
                                               T node)
        Mark node itself and nodes reachable from him as uninteresting. These nodes will not be included in iteration result.
        Parameters:
        node - node to mark as uninteresting
      • markUninteresting

        public abstract void markUninteresting​(@NotNull
                                               Collection<T> nodes)
      • remove

        public final void remove()
        Specified by:
        remove in interface Iterator<T>