Package org.apache.cayenne.ashwood.graph

## Class DepthFirstSearch<E>

- java.lang.Object
- - org.apache.cayenne.ashwood.graph.DepthFirstSearch<E>

- All Implemented Interfaces:
    `Iterator<E>`
  Direct Known Subclasses:
    `DepthFirstStampSearch`

      public class DepthFirstSearch<E>
      extends Object
      implements Iterator<E>

  Since:
    3.1

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected DigraphIteration<E,​?>` | `factory` |
    `protected E` | `firstVertex` |
    `protected Set<E>` | `seen` |
    `protected ArrayDeque<ArcIterator<E,​?>>` | `stack` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DepthFirstSearch​(DigraphIteration<E,​?> factory, E firstVertex)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `hasNext()` |
    `E` | `next()` |
    `void` | `remove()` |
    `void` | `reset​(E newFirstVertex)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### Field Detail

    - #### factory

          protected DigraphIteration<E,​?> factory

    - #### firstVertex

          protected E firstVertex

    - #### stack

          protected ArrayDeque<ArcIterator<E,​?>> stack

    - #### seen

          protected Set<E> seen

  - ### Constructor Detail

    - #### DepthFirstSearch

          public DepthFirstSearch​(DigraphIteration<E,​?> factory,
                                  E firstVertex)

  - ### Method Detail

    - #### reset

          public void reset​(E newFirstVertex)

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<E>`

    - #### next

          public E next()

      Specified by:
        `next` in interface `Iterator<E>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<E>`